I've been a zone leader with DZone since 2008, and I'm crazy about community. Every day I get to work with the best that JavaScript, HTML5, Android and iOS has to offer, creating apps that truly make at difference, as principal front-end architect at Avego. James is a DZone Zone Leader and has posted 639 posts at DZone. You can read more from them at their website. View Full User Profile

My Latest Refcard: Java GUI Development

04.19.2010
| 9859 views |
  • submit to reddit

Today DZone releases my latest refcard on Java GUI Development. It's probably been my most challenging card to write to date, as it provides a reference for both Swing and SWT. Having used both technologies extensively in my time as a Java desktop developer, I thought that it would be worthwhile to have one single reference to use while developing Java rich client applications.

The aim of the refcard is to give a concise overview of what's available in both toolkits, including high level overviews of layout managers, event management and dealing with threads. 

While writing the card I was wondering if many people write Swing/SWT applications from scratch anymore, or do most people take advantage of the rich client platforms provided by NetBeans and Eclipse? For me, knowing the basics of SWT is essential in order to write RCP applications in Eclipse, but it's been a long time since I've written a basic SWT shell based application.

As with all Refcardz, we welcome any feedback and will make sure to reflect suggested changes in the online version of the card. 

 

 

Comments

Joern Haferstroh replied on Mon, 2010/04/19 - 3:50am

Very good refcard. For beginners I think the "Threading issues in Swing" chapter is too short. First there should be mentioned, that there is an "Event Dispatch Thread" where all events are handled, before showing a way how to perform time consuming tasks outside of this thread. Also I would mention the methods SwingUtilities#invokeLater and SwingUtilities#invokeAndWait as an alternative to SwingWorker. If there would be more place available, I would wish a chapter about how to paint in a window, including a short description of the event-driven painting model (mark a region as dirty with repaint() and paint it asynchronously with paint()). Best regards Joern Haferstroh

James Sugrue replied on Mon, 2010/04/19 - 9:12am in response to: Joern Haferstroh

Thank you - some great ideas for additions there. I agree, the Swing threading chapter is a bit short.

Hopefully I can work these items in soon. 

 

James

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.