|
Not to be rude but maybe you should learn the basics first, correct threading is more or less an advanced topic. Actually the java tutorials put together by sun is exceptionally good: http://docs.oracle.com/javase/tutorial/[^]
There is a paragraph on that page with "Trails Covering the Basics" header, you should read through that carefully, you will find topics about threading in the "Essential Java Classes" part, but read it from the beginning to the end without skipping. After this basic tutorial you won't ask questions like this.
|
|
|
|
|
Any special features and tricks to Eclipse Debugger, I've hit an error while fusing it to the client. the server gets the connection but all input is just added to the JTextArea without being sent to the server even though it's told to send. I'd prefer to fix this one so I don't have to spam these forums.
|
|
|
|
|
Start using a good java IDE. Eclipse is one of the best free IDEs out there, choosing that you can only win. Download it and learn its basic features (how to set up a project and how to debug in it).
Advice regarding your program: Hook the input of your textbox and perform the "send text" action when the user presses enter in the textfield.
When sending the text it might be a better idea to clear the textfield instead of selecting its contents.
|
|
|
|
|
First of all you didn't set text in the JTextField and also you've not even enabled the user to write into the JTextField.
Because, setEditable(false); means the user cannot edit the text in the text field and also there was no text in the Textfield.
And also you do not need to create object for the class GUI in actionPerformed() because this method was written in the same class only. This means that you are performing action on the object 'g' which you've created.
You can directly access them, there is no need of creating the object.
|
|
|
|
|
Hi,
I need help to set up the SSL in Mutual Authentication.
Can any body help in this.
Regards,
Balu
Singapore
|
|
|
|
|
balarayala wrote: I need help You could start here[^].
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Thank you for your reply..
I have IIS Server and Linux Client. I am having some trouble in setup.
If you have any idea on mutual setup. can you help me.
|
|
|
|
|
balarayala wrote: If you have any idea on mutual setup. Sorry no, did you check the links I gave you, the third one down contains lots of good details.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
I guess you downvoted me because I did not fix your 'problem'. Given the amount of information you have provided I don't think many people could answer your question.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Richard MacCutchan wrote: guess you downvoted me because I did not fix your 'problem'
Countered with a 5 because from what I saw with google, it would point him in a good direction
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Thanks. It's amazing how many questioners use downvotes rather than actually doing some work for themselves.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
You provided good information to me.
Richard dont mistaken me, by mistake click that voting because i am new to this blog
|
|
|
|
|
In that case I apologise. For future reference, when voting on posts, 1 means bad and 5 means good. If you are not sure which then you can just leave a comment.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
You should not apologize. i need to say apology. mistake is mine. can we edit that rating?
|
|
|
|
|
You can just click on one of the other numbers in the message to change it, but really it is not that important. Getting you to understand how the forum works is more so.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Hello,
I want to write a formula in excel through java but when I do the following a formula is displayed in the cell without displaying the results.The error with the formula is also seen.'A value used in the formula is of wrong data type'
but the above error disappears if I reenter the same formula for the same data.I am using the following code to do with jxl libraries.
StringBuffer buf = new StringBuffer();
buf.append("MDETERM(A1:D4)");
Formula f = new Formula(0, 11, buf.toString());
Pritha
|
|
|
|
|
Me thinks the formula is wrong, try:
buf.append("=MDETERM(A1:D4)");
Panic, Chaos, Destruction. My work here is done.
Drink. Get drunk. Fall over - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer
Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
|
|
|
|
|
thanks for ur reply
I tried that but it doesnt work and surprisingly
buf.append("SUM(A1:a4)");
works fine then why
buf.append("MDETERM(A1:D4)"); should have a problem
|
|
|
|
|
can i have a javascript code to convert eglish text to hindi text in offline mode
|
|
|
|
|
Most unlikely; but you could investigate how to use Google translate[^].
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
we want to create File transfer Instant messenger in java what are the core areas in java we should know to build it?
|
|
|
|
|
|
|
hello
I have a form with jsf2 and primefaces that contains a submit button that managed two things: First: form validation with the update attribute and second launching a confirmation dialog box when validation succeeded and all of this are managed by:
update="myfieldset display"
so my problem is that when I click into the button validation: if validation don't succeeded : validation messages are displayed in the form : ok but if the validation succeeded I must click a second time to display dialog box
anyone know how to solve this problem there?
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui"
xmlns:f="http://java.sun.com/jsf/core">
<script type="text/javascript">
<!--
function effacer(formulaire){
for (var i=0; i<formulaire.length; i++){
if (formulaire.elements[i].type=="input" || formulaire.elements[i].type=="textarea" ) {formulaire.elements[i].value="";}
}
document.getElementById('contenu_input').value="";
}
</script>
<body>
<ui:composition template="./template_utilisateur.xhtml">
<ui:define name="content">
<h:form id="form" prependId="false" >
<p:fieldset id="myfieldset" legend="Nouveau message">
<p:messages id="msgs"/>
<h:panelGrid columns="3" style="margin-bottom:10px">
<h:outputLabel for="title" value="Titre : *"/>
<p:inputText id="title" style="width:340px;" value="#{messageController.titre}" required="true" requiredMessage="veuillez saisir un titre" label="Titre">
<f:validateLength minimum="10" />
</p:inputText>
<p:message for="title" display="icon"/>
<h:outputLabel for="city" value="Destinataire : *" />
<p:selectOneMenu id="city" value="#{messageController.destinataire}" label="Destinataire" required="true" requiredMessage="veuillez choisir au moins un destinataire" >
<f:selectItem itemLabel="Séléctionner déstinataire" itemValue="" />
<f:selectItems value="#{messageController.users}" />
</p:selectOneMenu>
<p:message for="city" id="msgSurname3" display="icon"/>
<h:outputLabel for="comm" value="Lié a La commande N° : " />
<p:selectOneMenu id="comm" label="Commande" value="#{messageController.idComm}" >
<f:selectItem itemLabel="Aucune commande" itemValue="" />
<f:selectItems value="#{messageController.id_c}" />
</p:selectOneMenu>
<p:message for="comm" id="msgSurnamse3" display="icon"/>
</h:panelGrid>
<h:outputLabel for="contenu" value="Contenu : *" />
<h:panelGrid columns="2">
<p:editor id="contenu" widgetVar="editer" value="#{messageController.message}" width="600" required="true" requiredMessage="Veuillez saisir le contenu du message" >
<f:validateLength minimum="10" />
</p:editor>
<p:message for="contenu" id="editorm" display="icon"/>
</h:panelGrid>
<h:panelGrid columns="3">
<p:commandButton id="submitButton" value="envoyer" update="myfieldset display" onclick="#{messageController.retournerDialog()}" icon="ui-icon-disk" />
<p:commandButton id="clearButton" type="reset" value="initialiser" onclick="editer.clear()"
icon="ui-icon-close" />
</h:panelGrid>
</p:fieldset>
<p:dialog header="Confirmation" widgetVar="dlg" showEffect="fade" hideEffect="fade" modal="true">
<h:panelGrid id="display" columns="1" cellpadding="4">
<h:outputText value="Titre : " />
<h:outputText value="#{messageController.titre}" id="model"/>
<h:outputText value="Déstinataire :" />
<h:outputText value="#{messageController.destinataire}" id="year"/>
<h:outputText value="Lié à la commande N° : " />
<h:outputText value="#{messageController.idComm}" id="manufacturer"/>
<h:outputText value="Contenu :" />
<h:outputText id="displxcay" value="#{messageController.message}" escape="false" />
</h:panelGrid>
</p:dialog>
</h:form>
</ui:define>
</ui:composition>
</body>
</html>
and here the method to launch the dialog :
public String retournerDialog(){
String retour = "";
if( getDestinataire() != "" && getMessage()!= "" && getTitre()!="" && getMessage().length()>9 && getTitre().length()>9){
retour="dlg.show()";
}
return retour;
}
thank you in advance
modified 7-Aug-12 9:31am.
|
|
|
|
|
I previously posted this on another forum which didn't seem to have a response, probably due to a low amount of users.
www.gamedev.net/topic/629181-java-chat-server-unknown-issue-beginner/
I've identified the problem as the loop getting stuck on the second run at the serversocket.accept() where the loop waits for a new client before dealing with other clients. I can't use serversocket.setTimeout() because then it will throw a exception which completely stops the server and if I place it in it's own try statement then the .accept will fallout of the scope and be pointless.
|
|
|
|