JTextArea thread safe?
Posted
by
Dhaivat Pandya
on Stack Overflow
See other posts from Stack Overflow
or by Dhaivat Pandya
Published on 2011-02-01T23:08:08Z
Indexed on
2011/02/01
23:25 UTC
Read the original article
Hit count: 274
Hello everyone,
I have some code that does some initialization (including making a JTextArea object), starts three seperate threads, and then these threads try to update the JTextArea (i.e. append() to it), but its not working at all. Nothing shows up on the JTextArea (however, during the initialzation, I print some test lines onto it, and that works fine). What's going on? How can I fix this? Also, each of those threads sleeps a random amount of time every time it has to update the JTextArea.
Sorry I haven't provided any code, its all spread out over several files.
© Stack Overflow or respective owner