Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Swing Threading  RSS feed

 
Hawk Eye
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What strategies do you recommend for dealing with threading in Swing. Do you think Swingworker is sufficient or do you have a preferred tool like Foxtrot/Spin/other?
 
Scott Delap
author
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Spin and Foxtrot are both good solutions. Spin is a little more evasive since it requires interfaces to proxy. Foxtrot is good since it is still a synchronous programming model. You don't don't have ot worry about asynchronous problems. I tend to prefer Foxtrot for simple cases and things like Spin and SwingWorker for more complex ones. I also write a decent amount of threading code myself using just the SwingUtilities methods.
 
Scott Delap
author
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Desktop Java Live sample chapter is now available on Java.net.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!