Here are some Swing links that you might have missed during the last week:
- The work on Caciocavallo project that aims to improve OpenJDK graphics stack to enable the use of external implementations of AWT/Java2D backends is continuing even after the official submission date of the OpenJDK Innovators’ Challenge. Roman Kennke has posted a progress update on the project, including two new AWT widgets based on swing, merging back patches from the Cacio branch to main JDK7 and more font refactoring work.
- Jean-Francois Poilpret has taken over the development of DesignGridLayout project that has been in limbo for the last two years. Release 0.9 fixes all known bugs, along with refactoring the code to improve the API, complete Javadocs coverage for the public APIs, and changing the license from GPL to ASL 2.0. It is also available on java.net Maven site.
- Maxim Zakharenkov has presented a session on his SwingExplorer project at this year’s JavaZone conference. The PDF slides are available here. Martosfre Pichincha has a short blog entry on this project.
- Gregg Bolinger shares his thoughts on separating the UI layout logic from the business logic. He cautions against immediate adoption of one of the nascent Swing application frameworks (such as AppFramework, JDAF, Spring RCP and Griffon), instead opining to consider simple Java inheritance, whereas the UI layout logic is placed in the base abstract class which is then extended with a class that implements the business logic.
- Ken Orr continues his work on the Mac Widgets for Java project, providing a Mac-only implementation of Heads Up Display (HUD) consistent with the visuals of HUD windows in many Apple programs.
- Ken Kousen shares his thoughts on Griffon and how it makes the development of UIs simpler, especially for beginner programmers. The Swing example is not the best one, violating the EDT rules, working with the content pane and not centering the frame in the monitor, and the author admits some of these points.
- And on the related note, Geertjan Wielenga interviews the main developers behind Griffon. If you are interested in the past, present and future of Griffon straight from Andres Almiray, James Williams and Danno Ferrin, dive in.
A special section this week is going to cover three projects that should be of interest to Swing developers.
Sage is a platform for running web-enabled desktop applications. It uses a markup language for specifying the UI layout, and allows attaching JavaScript (or Ruby, Python etc) event handlers for the business logic. The CSS-like markup language allows to style not only the UI, but the data as well, providing advanced customization capabilities. Behind the scenes, Sage is using Swing and Java2D to handle the UI control compositing and rendering. The project is developed by Don DeCoteau and is available in 0.9 release.

Sage Medical Application demo

Sage Outlook Clone demo
OfficeLAF project aims to create a high-fidelity implementation of Office 2007 UI and its Black skin as a NetBeans module. It is currently under development with the planned 1.0 release around Christmas. Readers of this blog will notice that the top part of the screenshot below features the JRibbon component from the Flamingo project. The main developers of the project, Gunnar Reinseth and Mikael Tollefsen from Exie AS are reusing some of the work being done in Flamingo, providing a high-fidelity skin and additional UI behavior (such as the main application menu button that is currently under development in Flamingo). Mikael has presented a session on OfficeLAF project at this year’s JavaZone conference, and the PowerPoints slides are available here.

OfficeLAF demo
Manuel Kaess has implemented a Vista-style help browser for Swing applications. Noting that the JavaHelp UI is not very easy to use and does not look too attractive, he provides his own help browser implementation that has the usual features that one would expect, including support for search, changing text size and printing. The screenshot below shows his implementation side-by-side with the native Vista help browser.

Vista Help side-by-side
Here are some Swing links that you might have missed during the last week:
Are SWT and Eclipse moving away from native widgets? If you follow the development mailing lists of the relevant Eclipse subprojects, this might be one of the more interesting questions for Java UI developers.
Much has been said over the past few years about the relative merits of Swing and SWT. SWT has always prided itself on using native widgets (wherever possible), sporting better platform fidelity and performance. In the meantime, the competitive pressure from SWT has, in the view of many observers, made Sun invest much-needed attention in Swing. It zigzagged a little in its priorities regarding native look-and-feels; much work has been done in Mustang for Windows and GTK LAFs, but the few glaring remaining bugs have been ignored ever since. However, Swing, AWT and Java2D teams at Sun have been at work bringing significant performance improvements (and not only for hardware-accelerated pipelines), using native font rasterizer on Windows, support for translucent and shaped windows and more.
The flexibility and extensibility of Swing painting pipeline allows creating applications that bear little semblance to the dated Ocean look, and it looks like SWT might be moving in this direction as well. Lotus Software has been purchased by IBM back in 1996 for 3.5 billion dollars, and IBM has put a lot of resources to continue the development of different Lotus components (such as Domino and Notes). Unbeknownst to many (which is a good sign for any software in general), Lotus is an SWT application. It certainly doesn’t look one – click the screenshot for the full size view:

Not much information is available on custom Lotus SWT components (or i haven’t looked hard enough), but this presentation (zipped PowerPoint) provides some insights – the UI guidelines are implemented with CSS:
A majority of our CSS support was intended to give the custom Lotus SWT widgets as much flexibility as possible. Styling standard SWT widgets is supported but very limited (fonts, colors, background image).
Another interesting development comes in the form of Eclipse Riena which is currently in the incubation stage. While you might want to skip the buzzword soup in the project description (enterprise service oriented blah blah), Riena aims to bring a fresh look to Eclipse RCP applications. The presentations at Eclipse Summit (PDF) and Eclipse Forum Europe (PDF) show these designs (click for full size view):


And while the UI of the sample applications shipped with milestone 4 of Riena 1.0 is quite far from the design mockups above, the trends are quite clear – Eclipse / SWT based applications are trying to break away from the native look-and-feel. So what are the plans for core SWT layer?
The answer to this question might be found in the mailing lists of e4 project. e4 is the codename for the next major release of Eclipse (hence the number 4). There are a lot of interesting ideas bouncing around the lists, including using EMF for driving the UI definitions (aiming, perhaps, at the same level of design/development separation as available in WPF, Apollo and JavaFX) and targetting different runtime environments such as Web browsers. It appears that one of the fundamental shifts is going to be the support for CSS skinning for the UI components.
Kevin McGuire is a platform UI contributor working for IBM on Eclipse UI, and his views on Eclipse-based RCP applications are quite refreshing:
As I survey the Eclipse based applications, RCP or not, they all look, well, like Eclipse based applications. Eclipse provides much power through reuse of existing components and extension of frameworks. But my goal as an application developer is to build software that is as appropriate for my audience as possible. That audience could be anybody. However, many choices we made early on in Eclipse were with an IDE user in mind and just don’t work well for other user types.
Why should my choice of technology so blatantly drive the UI experience? I’d like all that reuse and power, thank you, but the end result shouldn’t betray the technology used to build it, provided I am willing to invest in specializing it.[…] I’d like to see as rich a set of graphical front ends for Eclipse. Certainly CSS helps by providing good separation of behaviour and UI, but the components must be designed to make use of this separation.
[…] Eclipse based applications should be capable of the same degree of visual and interaction sophistication as web based applications. This is essential for reaching a wider audience.
This point of view is also shared by Christian Campo from the Riena project:
- RCP UI looks like the IDE
- is not that easy on endusers
- while there is an option to allow “freestyle” there is certain of look that seems well established i.e. Outlook and others (including Riena)
- there is already some common sense how user interfaces for endusers are designed like MS Office, Lotus etc.
- wouldn’t it be cool that we have more support for that in Eclipse rather than each application has to build that from scratch.
- endusers no longer expect their tools to have a native platform look
Are we going to see a UI customization layer in SWT that is similar to Swing’s look-and-feels?
The ribbon component is quickly becoming the new standard for Microsoft applications. A significant break away from the traditional menu-toolbar approach that has reached its scalability limit faced with ever-increasing amount of features in the Office suite, it is poised to become the main UI concept in the upcoming Microsoft products.
Speaking at Office System Developer Conference in February 2008, Bill Gates said:
We in the next version of Windows will be using this Fluent [Ribbon] UI quite a bit across a number of applications. […] It turns out it’s a user interface that works very well for the pen and touch [interfaces] as well as being a better way of revealing application functionality.
In his interview, Richard Wolf, general manager of the Microsoft Office Graphics Division detailed the plans for using Ribbon in Visio:
Well, we’ll be announcing that the next version of Visio will feature the new Office “fluent” user interface, or ribbon, which I know has been something many users have been asking us about, so again it’s a question of delivering on what our customers tell us is important to them. The ribbon is key because it allows us to expose more of the functionality of the product. […] The other key benefit that customers will get from the ribbon is a similar way of working to their other Office tools that will make it easier for new users to get up to speed with Visio.
And the recent news confirm the words of Bill Gates. Stephen Chapman has played with an interim build of Windows 7 (next version of Windows OS), and he reports that both Paint and WordPad are now using Ribbon as the primary UI:
MS Paint: In terms of functionality, imagine a software somewhere between the currently-existing MS Paint and the wonderful Paint.NET freeware application. Make everything accessible through a ribbon bar (tabs ‘n all) ala Office 2007 and voila. […] WordPad: Basically, imagine Microsoft taking Office 2007 Word, slimming it down, tweaking the ribbon bar UI a bit, and calling it WordPad. While not as functional as Office 2007 Word (hence, the “slimming it down” mention), this version of WordPad is coming along nicely.
And his next blog entry features a screenshot of Windows 7 Paint in action:
Windows 7 M3 Build 6780 MS Paint UI:

(Click the picture for the full-resolution image)