problem sending text publisher/subscriber
Hi,
I made a publisher and a subscriber and i want to be able to sent and recieve text, i did this by creating a topicsubscriber and topicpublisher.
I can recieve and sent text in my textArea1 but i also want to be able to sent another text in textArea2 but the text in textArea2 must NOT sent to textArea1, how to do accomplish that?
this code works but for one textArea
publicvoid run()
{
while (true)
{
try
{
TextMessage tm = (TextMessage)tsub.receive();
setText(""+tm.getText());
}
catch (Exception e){ setText(""+e);}
}
publicvoid setText(String s){
textArea.append(s+"\n");
textField.setText("");
}
}
Message was edited by:
deAppel

