Take care of calling SWT or Swing method from threads which not belong to the original Swing or SWT Thread -> Other Process or ThreadGroup.
Using SWT it means calling the text.setText method must be executed using the Display object
display.asyncExec(new Runnable() {
public void run() {
cf.send(message)
}
});
using swing means
SwingUtilities.invokeLater(new Runnable() {
public void run() {
cf.send(message);
}
});
So your looü should look like this
while(true){
messages = is.readLine();
System.out.println("From ResMesClient : "+messages);
if(!messages.equals("QUITCLIENT")) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
cf.send(message);
}
} else {
//Quit programm or whatever
}
});
}
I think there should be your problem.