• Post Reply Bookmark Topic Watch Topic
  • New Topic

SwingWorks  RSS feed

 
Luis Fernandes
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
Can someone explain me( With Example Code ), how to use the SwingWork ?
I know, is a resource that are available in version 6 of java , and is used to run the tasks "In background", but i need a simple example that show this resource in work.

Best regards
 
Qunfeng Wang
Ranch Hand
Posts: 434
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have a look at Java Tutorial.

Basically SwingWorker lets you excute heavy(File IO, Network communication, etc) work in a background thread. And when the heavey work finished, it will excute the GUI related code automatically in EDT(Event=Dispatch-Thread) thread.
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
an example
http://forum.java.sun.com/thread.jspa?threadID=5201078&start=23
google for more examples
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!