Here are some Swing links that you might have missed during this week:
- A three-part series by Eric Burke on do’s and do not’s of scroll panes. Read part 1, part 2 and part 3. A good rule of thumb would be to never use scroll panes for wrapping UI controls. Only use them for wrapping text areas, trees, lists and tables.
- The first public tutorial on using AnimatedTransitions library by Nazmul Idris. Promised at this year’s JavaOne and covered in Filthy Rich Clients, this library is yet to see the light of the day (and hence the tutorial is a little unexpected). I’ve written on the subject of UI transitions before, questioning the usefulness of this technique; it still appears that this field draws a few “that’s interesting” but doesn’t go much farther than that. An interesting paper can be found in the Phosphor research project that puts some hard numbers on transitions usability.
- Want to use Swing look-and-feels in Groovy 1.1 applications? Danno Ferrin shows you how.
- SwingWorker gets some internal facelift in the latest Dolphin binaries, switching the thread pool implementation to the standard java.util.concurrent classes.
- Matt Nathan has a first draft of the tutorial on JXComponent and XComponentUI classes. Combined with Jan Haderka‘s announcement on release 0.9 of SwingX (which coincided with the downtime for swinglabs.org), it shows that there is still some life in SwingX. Unfortunately, it still lacks well-defined release schedule and strong commitment from Sun to the development lifecycle and overall direction of the project.
Looks like the official release date for OS X Leopard is next Friday (October 26th), and Apple has published the list of 300+ new features available in this release. One interesting feature that caught my eye is the “Help Menu search” described as:
Enjoy more helpful Help. A new search field in the Help menu displays all relevant menu items in the active application. Highlight one and Leopard opens the menu and highlights the command.
And here is the official screenshot thumbnail that shows it in action:

Here is an unofficial screenshot of the same feature (taken from this page):

I’m not sure if it’s patented, and if it is, i hope that i don’t get sued for infringing on it :)
Here are some Swing links that you might have missed during this week:
- A very informative posting on the AppFramework mailing list from Hans Muller that includes advice by Shannon Hickey on handling uncaught exceptions in EDT. There are three alternatives, none of them providing a complete solution (unfortunately):
- Toolkit.getSystemEventQueue.push() with a custom event queue.
- The “sun.awt.exception.handler” system property.
- Thread.setUncaughtExceptionHandler(UncaughtExceptionHandler). This option is also mentioned here.
- An article by Rene Ghosh on implementing a text console component, complete with color and anti-alias support.
- A posting by Oscar Vega Gisbert on improving the menu selection layer in Swing. A very interesting and LAF-agnostic approach that should be made a part of core Swing implementation. Full source code available.
- An overview of the existing SVG to Java2D transcoders by Jan Erik Paulsen, and their extension to the Javascript based Darkstar FX renderers.
Just before the feature freeze of Substance 4.1, i added a new Coffee Cream skin that is based on the existing Creme skin and the Ubuntu’ish brown active theme. If you want to take it for a spin, click on the WebStart button below and change the skin to Coffee Cream from the “Skins” menu:

To use it in your application, you have the following three options:
-Dswing.defaultlaf=org.jvnet.substance.skin.SubstanceCremeCoffeeLookAndFeel
UIManager.setLookAndFeel(new SubstanceCremeCoffeeLookAndFeel())
UIManager.setLookAndFeel("org.jvnet.substance.skin.SubstanceCremeCoffeeLookAndFeel");
Here are a few screenshots that show this new skin. A small frame with a tabbed pane and a few different controls:

A frame with a tree and a list:

Sliders in different states:

(New) Progress bars in different states:

Error pane component from SwingX project:

A frame with menu bar, tool bar and status bar from SwingX project:
