TechBookReport logo



Keywords: Java, user interfaces, Swing, AWT

Title: Swing Hacks

Authors: Joshua Marinacci and Chris Adamson

Publisher: O'Reilly

ISBN: 0596009070

Media: Book

Level: Intermediate Swing

Verdict: An excellent resource. Highly recommended.

 

No one would dispute that building good-looking and snappy Swing GUIs is an easy art to master. Sure, most decent Java tutorials include a lesson or two that introduce Swing and AWT, but there's a whole mountain to climb to gain the skill to build GUIs that look great and have good performance. Now, thanks to the good folks at O'Reilly, some of the experience and skill of expert Swingistas has been condensed and published in 'Swing Hacks'.

While there's some minimal knowledge of Swing (and AWT) assumed, this is a book that's designed to help pass on some cool tips, tricks and techniques. It's not a tutorial or introduction to Swing, but it makes a good second volume once you've mastered an introductory tutorial. Organised into a dozen chapters, the book includes fairly complete coverage of all aspects of Swing - from basic components to tables, animated windows, text rendering, drag and drop, audio and so on. There's even coverage of the key issue of threading, essential for creating the most responsive GUIs.

The individual hacks, and there are 100 of them in the book, range from one or two pages to 10 or 12. As you would expect this is a book that's heavy with code, though that's not to say that it's just a book full of Java listings. The code is important, but just as important are the explanations in the text. Each hack is explained, with relevant background and additional information. For example the excellent hacks that deal with JTables and databases include information of JDBC and sample code for the open source HSQLDB Java database.

Many of the hacks are about making Swing look, and act, more like the native GUIs for different platforms, (Windows and MAC OS X in particular), and applications. It's more than just simple look and feel, there are also graphic effects such as sliding notes out from the task bar or providing ZIP file previews in file dialogs. These are covered, often in a way that remains true to the cross-platform nature of Java. In other cases, such as support for Windows short cuts (.lnk files), the hacks have to be platform specific.

Weighing in at something just short of 520 pages, this is a book that's bigger than many of the others in the popular Hacks series. It is, however, like many of the other titles in the series, an excellent resource and a great book for dipping into now and again. Highly recommended to all Java programmers want to add some zest to their Swing.


Hit the 'back' key in your browser to return to subject index page

Return to home page

Contents © TechBookReport 2005. Published September 5 2005