The other week I was teaching a Swing crash course to some of my colleagues, and the inevitable question raised during day one was: “What should I use: Swing or SWT?”
As there are lots of misperceptions about Swing I started out by explaining the key misunderstandings:
- Swing applications are SLOW!
- Swing applications are UGLY!
- Swing is too COMPLEX to use!
These tree issues are the main reason for many people to consider alternatives for Swing, like SWT. So during the next days of the course we talked in-depth about the painting internals, the Event Dispatching Model, Swing’s Single Threading Rule, and the modular approach of the API, thanks to the Separable Model – MVC tweak. Understanding these issues is key to writing proper Swing applications. Together with all of the performance enhancements that were made in the past years, I believe it is truly possible to write some decent desktop applications with Swing. Complexity is still a factor that can’t be taken out easily though. However, is SWT really that much simpler?
I consider myself rather unbiased to both technologies, but in the end I still got the feeling that choosing between Swing and SWT is more of a bias than a true choice. Today, I found an excellent new article regarding choosing between Swing and SWT on Hacknot. A must read for everyone that wants a fairly complete comparison between both technologies.