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

  • Thierry Lefort published an update to the lazy loading tree. It now includes a single expansion listener and better model / controller separation.
  • Alex Ruiz will present a JavaOne session with Yvonne Price. It will talk about GUI testing and their FEST library.
  • Jeff Friesen has an overview article about the AnimatingCardLayout project that provides animations on top of a usual core card layout. I have already blogged about the various approaches to the layout animation, and the last year hasn’t changed my opinion. These are nice to have, but almost never used. An important note on the specific project – it has been inactive since December 2004, so if you find a bug or want to file an enhancement, you’re on your own (the project license is BSD).
  • Christopher Deckers announces release 0.9.4 of DJ Native Swing library. This brings improvement to stability and two new components, JVLCPlayer and JHTMLEditor.
  • Christophe Le Besnerais writes about his experiments in colorizing Swing UIs. The code has an interesting twistin that it allows colorizing only some parts of the interface.
  • Pavan Kumar explores a technique of showing progress without blocking the entire UI. Building on the previous work by Alexander Potochkin, it is a nice idea, but i found that the test application is not working as expected. While the table is indeed not blocked by the tree and shows that a selected cell is editable, i couldn’t type anything in until the tree was unblocked.
  • Dave Cherry is working on wrapping the JFreeChart library in a Groovy builder. The code is being developed on top of the GroovyChart library.
  • Andres Almiray has a busy Groovy week. He announced release 0.5 of his GraphicsBuilder library and also published the fourth part of the Groovy Zone tutorial.

Finally, quote of the week belongs to James Gosling:

Even though it’s a Java game, it’s only available for Windows and OS X – they use QuickTime for Java. (we’re trying to get our cross-platform media story together, but it’s tough… [codecs are easy, we’ve got piles of them: it’s all about patent royalties on free software :-( ])

Let’s compare this with QT Jambi:

Qt and Qt Jambi 4.4 gets full-blown multimedia support through the Phonon framework adopted from KDE. This gives easy access to playing and manipulating movies and music in all the nice file formats for which the underlying media framework has codecs. The framework defaults to using Gstreamer (Linux), Microsoft DirectShow (Windows) and Quicktime (Mac OS X).

So, another cross-platform UI toolkit is showing that it can be done and that it will be officially released this year

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

  • Thierry Lefort kicks off the week with an implementation of lazy loading tree. It handles quite a few scenarios with a very simple approach, but the code overhead could be a little better (having only one SwingWorker and one listener would be welcome, especially for large trees that warrant such a functionality).
  • Albireo is a new Eclipse incubation project. It aims to simplify the task of combining Swing and SWT components, and at first stage focuses on allowing seamless embedding of Swing component in SWT applications (as opposed to the DJ project that allows integrating native components in Swing applications). The project is lead by Gordon Hirsch and Bruno Haible, and you can follow all the intricacies of bridging the two UI toolkits at the mailing lists. If you want to learn more about this project, come to session 211 and session 549 at EclipseCon (March 17-20 at Santa Clara).
  • On a related subject, QT Jambi AWT bridge allows integrating AWT / Swing and QWidget components (both ways). Eskil Blomfeldt has announced the availability of Windows pre-built binaries.
  • David Qiao of JIDE blogs about bringing a piece of Vista functionality into the JIDE tables. I have done a similar thing about a year ago, bringing two Vista features to Swing trees (part 1 and part 2).
  • And finally, Thierry Lefort wraps up the week with the discussion of reusing the same filter on multiple JXTable components from SwingX component suite.

The entry on translucent and shaped windows in Swing has generated quite a lot of discussion and interest. It appears that readers were interested in per-pixel translucency and soft clipping for shaped windows, and Anthony has provided a few tips on how to achieve this. So, pending an official guide / tutorial from the AWT team (hint hint), here is my take.

Soft clipped per-pixel translucent window

What you see here is a JWindow with soft-clipped top-left and top-right corner and pixel-level translucency in the bottom half. In addition to Anthony’s instructions, i have used the following:

The source code is here. I’m pretty sure that it’s not the best (and not the most readable), but it shows the potential. You’re more than welcome to use this code as a starting point (don’t forget to credit Chris, Romain and Sebastien if you’re reusing it).

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

  • Probably the biggest news of the week come from the latest b12 drop of JDK 6.0 update 10. As reported earlier, it provides support for native text rasterization on Windows, as well as translucent and shaped windows. This thread from java.net forums has more information on the native text rasterization, and the earlier blog entry describes the APIs to create translucent and shaped windows. Don’t skip the comments section that has quite a lot of additional information on performance and pixel-level translucency (for soft clipping shaped windows, for example).
  • While these two features are in the latest development builds of 6u10, a lot of applications can benefit from this functionality in JDK 5.0. The native text rasterization is available under Substance look-and-feel and its Bramble plugin (using SWT), and Christophe writes about using JNA for pixel-level translucent windows.
  • Jan Haderka writes about the latest stable 0.9.2 release of SwingX component suite library. The SwingX team has been very active lately, fixing a lot of bugs and providing very swift and professional response to user queries. Hope it won’t take too long before the official 1.0 release (JavaOne anyone? :) )
  • On a related subject, Thierry Lefort continues to explore the SwingX components. His latest entry shows how to combine the JXTipOfTheDay component with Rome RSS parser to display an RSS feed as a tip of the day.
  • As a “challenge” from one of Thierry’s earlier entries, Jeanette Winzenburg (the mastermind behind quite a few SwingX components) explores the renderer and highlight capabilities of the JXTable component.
  • Patrick Gotthardt has announced the official 1.1 release of the Pgs look-and-feel.
  • David Qiao of JIDE has announced the 2.2.2 release of JIDE components. I really wish that they had time to maintain an active blog to showcase the new features as they are made available. While the latest entry on rotating icons is quite useful, the previous “real” one was back in December. And on a related note, David will hold a birds of feather session at this year’s JavaOne. The topic is “Workaround Swing bugs” and he is looking for feedback on the bugs you would like to be discussed.
  • Andres Almiray continues making the graphics development easier for Groovy heads. This week he takes a stab at balloon shapes, multiline text and text alignment.