How to get input into jtext file from different class
I am making chat app with publisher and subscriber
I got two class one for the chat frame and one is chat member's class.
The member class get the message from jtextfield and the chat member publisher send it back to jtextarea.

I get difficult to get back the text to the jtextarea from the subscriber 	MessageListener

				@Override
				public void onMessage(Message m) {
					try {
						TextMessage textMessage = (TextMessage) m;
						System.out.println("Received:" + textMessage.getText());
					} catch (Exception e) {
						e.printStackTrace();
					}
				}
			}; 

	MessageListener listener = new MessageListener() {
				@Override
				public void onMessage(Message m) {
					try {
						TextMessage textMessage = (TextMessage) m;
						System.out.println("Received:" + textMessage.getText());
					} catch (Exception e) {
						e.printStackTrace();
					}
				}
			};

Thanks.

How to get input into jtext file from different class
===

I am making chat app with publisher and subscriber
I got two class one for the chat frame and one is chat member's class.
The member class get the message from jtextfield and the chat member publisher send it back to jtextarea.

I get difficult to get back the text to the jtextarea from the subscriber 	MessageListener

				@Override
				public void onMessage(Message m) {
					try {
						TextMessage textMessage = (TextMessage) m;
						System.out.println("Received:" + textMessage.getText());
					} catch (Exception e) {
						e.printStackTrace();
					}
				}
			}; 

	MessageListener listener = new MessageListener() {
				@Override
				public void onMessage(Message m) {
					try {
						TextMessage textMessage = (TextMessage) m;
						System.out.println("Received:" + textMessage.getText());
					} catch (Exception e) {
						e.printStackTrace();
					}
				}
			};

Thanks.
