Here are some Swing links that you might have missed during this week:

  • Geoffrey Wiseman shares an interesting tip on hiding a UI during the test running. In order to get the UI tests running on the continuous integration server, they needed to find a way to run in headless environment. While it appears that the solution works only on X server, it opens an intriguing array of possibilities which hopefully can be implemented in a cross-platform way in a general purpose UI test library such as Fest (by Alex Ruiz and Yvonne Wang Price). This would be useful in areas beyond testing. For example, most of the documentation screenshots for Substance (that show various themes, watermarks and skins applied to the same UI) are taken by a Robot-controled process. During this process (which takes a few minutes) i have to make sure that i don’t accidentally interact with the frames and dialogs that get captured so as not to interfere with the correct visuals. Can this process can be done in a headless mode with an approach similar to what Geoffrey is describing?
  • Davide Raccagni announced release 2.0 of his A03 look-and-feel (link a little slow to open because of embedded videos). A major change is that A03 now can run under JDK 5.0 (unlike the previous releases). In addition, it features a theming layer and has a few interesting visuals (such as decorated title pane gradients, progress bar fill pattern, rotated tabs on left and right placement and some others). Personally, i’m very happy to see that some code in A03 is based on the code from Substance (which is, in turn, based on some code from Looks, Quaqua and Xoetrope).
  • Elliott Hughes shares his frustration with the JTextPane implementation when it shows an HTML document. Starting from trying to prevent beeps on setText() API, he quickly gets into one of the biggest gaps in Swing as a modern UI toolkit (not mentioned in my previous rant) – support for HTML 4.0. Hasn’t it been eight years since it was finalized?

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.

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.

Here are some Swing links that you might have missed during this week:

  • “Fling Scroller” article on java.net by Jan Haderka. Shows how easy it is to implement motion-based scrolling in lists with Timing Framework and a little bit of math. The comments show a similar approach that works on any scroll pane.
  • The new Expression Layout manager by J. Stephen Kress. While the simple example is less readable at the first glance than FormLayout, time will tell if this approach is adopted by the individual developers and the tooling community. My advice to both this project and MigLayout – work with NetBeans, JFormDesigner and Instantiations to provide tooling support, either as the core functionality or third-party plugin.
  • Milestone 1 of Bean Properties by Shai Almog is out. The timing is a little unfortunate and Beans Binding (JSR 295) seems to be getting all the attention, but the time you spend on reading the examples will not be spent in vain. It also has examples on integration with SwingX, Echo2 and Spring.