Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to solve this problem (GUI strucking)  RSS feed

 
Vasu Reddy
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am implemening one GUI application, i have a general problem;

one window of the applivation performs some operations, it takes 5 min time.
During this 5min time; the total application was strucking and i can not any other task in that window.

I appreciate your advices to come out of this problem.


Thank you,

Regards,
 
Cp Baherwani
Ranch Hand
Posts: 41
 
Vasu Reddy
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you, and i am looking in that;

Reagards,
 
Agapios Hartzoulakis
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I have a question about the previous answer.
Is the swingworker a thread or it there are any differences?
In the previous example is the swingworker class more appropriate than a single thread and why?
P.S.:I have to admit that I haven't take a look at the swingworker class, I'm just try to identify if I have to do it
[ January 13, 2006: Message edited by: hartzoua hartzoua ]
 
Joe Ess
Bartender
Posts: 9425
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by hartzoua hartzoua:

Is the swingworker a thread or it there are any differences?


SwingWorker is simply a convenience wrapper around the Thread class. It frees you from having to implement Runnable/extend Thread, which may be inconvenient when you are dealing with lots of GUI classes. You could use either a thread or SwingWorker to solve a problem like the one above. Which one you use is more a stylistic decision than a technical one.
Have a look at the How To Use Threads In Swing page from the Java Tutorial for some examples.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!