my question relates to java gui with netBeans i'm trying to call a function from a TextField "Block" but some how my gui freezing's when I do the following: by the way if it's matters the other function called "startconnection();" are private to... (p.s->Forgive me for my english...)
private void userTextActionPerformed(java.awt.event.ActionEvent evt) {
String str = evt.getActionCommand();
if(connected)
sendMessage(str);
else{
if((str.length() > 10) &&
(str.subSequence(0, 9).equals("<connect>")) &&
(str.charAt(9)== '<' )&&
(str.charAt(str.length()-1) == '>')&&
(!connected))
{
clientName = str.substring(10, str.length()-1);
userText.setText("");
startConnection();//sweet spot!! this is where i'm stack...
}else{
chatArea.append("Invalid input if you want to connect\nplease type '<connect><Your Name>'\n");
}
}
}