• Post Reply Bookmark Topic Watch Topic
  • New Topic

How do I perform a sequence of events within Swing?  RSS feed

 
Phil Powell
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried using a Task class I wrote which extends SwingWorker<Void,
Void>:


Problem is now that it will do the following:

1) Show status of "Attempting to load.."
2) Show status of "Done"
3) Load the page into JEditorPane

The order I want is this:

1) Show status of "Attempting to load.."
2) Load the page into JEditorPane
3) Show status of "Done"

How do I accomplish this?

Phil
 
Phil Powell
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
GOT IT!



All I had to do was stuff everything into doInBackground() which created a worker thread out of the entire routine, stuffing progression and thread sleeping in between them!

Phil
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!