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 ]
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.