GeeCON Prague 2014*
The moose likes Swing / AWT / SWT and the fly likes Server + Swing (Append incoming messages to JTextArea Failure). Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Server + Swing (Append incoming messages to JTextArea Failure)." Watch "Server + Swing (Append incoming messages to JTextArea Failure)." New topic
Author

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

john price
Ranch Hand

Joined: Feb 24, 2011
Posts: 495

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


“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” (Mosher's Law of Software Engineering)
“If debugging is the process of removing bugs, then programming must be the process of putting them in.” (Edsger Dijkstra)
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10426
    
    8

It prints to the system, but won't append to the JTextArea

What happens? Exception? Error?


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2191
    
    7
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

Joined: Feb 24, 2011
Posts: 495

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
 
GeeCON Prague 2014
 
subject: Server + Swing (Append incoming messages to JTextArea Failure).