Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Server + Swing (Append incoming messages to JTextArea Failure).  RSS feed

 
john price
Ranch Hand
Posts: 495
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do I get this to work? I want to append the incoming message to a JTextArea. It prints to the system, but won't append to the JTextArea... Is there a way to get this to work?
Thanks,
cc11rocks
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It prints to the system, but won't append to the JTextArea

What happens? Exception? Error?
 
Rob Camick
Ranch Hand
Posts: 2753
11
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Based on the lack of information provided with the question all I can do is make a wild guess.

Don't talk to the server on the EDT. See: Concurrency in Swing for an explanation and solution.
 
john price
Ranch Hand
Posts: 495
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There was some problem with Swing and Threads. I fixed it. I don't totally know what I did wrong in the first place, but it's working 100% now.
Thanks,
cc11rocks
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!