• Post Reply Bookmark Topic Watch Topic
  • New Topic

JTextArea not updated during long processing

 
Jesus Angeles
Ranch Hand
Posts: 2069
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think this is a common problem but I havent found a solution yet.

I have a process which takes a long time, and I at least wants to show something, anything, on the gui, to let the user know that the program is still running (and it is not hanged or something).

I add notes on the JTextArea but it doesnt appear during the processing. I only get 'all' notes I added, when the processing is done.

May I ask for ideas on how, at least, I can let user know he is looking at a dead 'hanged' program?
 
Brian Cole
Author
Ranch Hand
Posts: 920
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jesus Angeles wrote:I think this is a common problem


Indeed it is. You are freezing the EDT.

See http://faq.javaranch.com/java/JProgressBarDoesntUpdate. It's about the same problem, despite the focus on ProgressBar.
 
Rob Spoor
Sheriff
Posts: 20822
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Concurrency in Swing
 
Jesus Angeles
Ranch Hand
Posts: 2069
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks guys. It worked. I did what is mentioned in the FAQ you mentioned.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!