aspose file tools
The moose likes Swing / AWT / SWT and the fly likes How to solve this problem (GUI strucking) Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply Bookmark "How to solve this problem (GUI strucking)" Watch "How to solve this problem (GUI strucking)" New topic
Author

How to solve this problem (GUI strucking)

Vasu Reddy
Ranch Hand

Joined: Sep 13, 2005
Posts: 32
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

Joined: May 13, 2005
Posts: 41
You need a SwingWorker thread to do the job which takes upto 5 minutes.

http://www.osc.edu/~watts/tutorials/gridview/gui-howto/gui-threads.html

http://java.sun.com/products/jfc/tsc/articles/threads/threads2.html
Vasu Reddy
Ranch Hand

Joined: Sep 13, 2005
Posts: 32
Thank you, and i am looking in that;

Reagards,
Agapios Hartzoulakis
Greenhorn

Joined: Oct 13, 2005
Posts: 17
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

Joined: Oct 29, 2001
Posts: 8265

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.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to solve this problem (GUI strucking)
 
Similar Threads
What's up with this DOS window?
Resolution Problem for Background images
Help!!! - Intermitent display of JSlider
How to Close multiple child windows from a parent window
calling second jPanel