I recently started using the look and feel library BizLaf of Centigrade GmbH (Germany) and I have come to the conclusion that, after 13 years of programming Swing UIs, this is by far the best look and feel library for Java that I have ever used. Reason enough to blog about it and to share my thoughts.

Prologue

For the last 2 and a half years I have been working on my very own software project called “Collapp” for collaborative project planning. I have made it my mission to make it one of the most professional looking applications ever written for Java (this is probably the reason why I still haven’t been able to release it). To me this means that the application should look polished on all platforms and at the same time feel natively to the platform it runs on. On a MacIntosh it should look like a Mac application (e.g. iTunes, iWeb, iPhoto, …) with typical Mac features (unified toolbar, sourcelist, …). On Windows it should look like a Windows application with the frame containing the menubar, and so on. It should be noted that Windows generally allows a higher degree of freedom when it comes to UI design (this can be good or bad).

Macintosh

For the Mac UI I was very lucky that I could use Ken Orr’s outstanding MacWidgets library. It gave me a great head start and I almost instantly looked at an application that fit right onto Macs. So far so good, unfortunately it is not very usable for Windows. The MacWidgets components really only work nicely on Mac, which in return shows how much attention to detail the Apple engineers put into the Aqua UI. Everything works hand in hand (e.g. the Window title and the toolbar appear as a single component / panel).

Collapp on Mac with action items

Collapp running on MacIntosh showing action items

Windows / Linux

So, what to do on Windows and Linux? Plan A was to use the Open Source look and feel project “Seaglass“. I presented this solution at JavaOne 2010 in San Francisco (Black Eyed Peas rocked!!!!) and for a long time I was very confident that I would end up using this approach. However, the development activities on this project slowed down quite a bit and there were always these little things that just didn’t seem right. Performance was also a big issue. Collapp felt quite sluggish when using Seaglass.

BizLaf

I started to get worried that I would end up with no UI strategy for non-Mac platforms, but then I read on Jonathan Giles’ excellent blog “Java Desktop Links of the Week” about BizLaf, a commercial look and feel implementation for Swing. I was first put off by the idea that I would have to pay for it, but still decided to evaluate it. I must say that BizLaf has been able to convince me 100%, because:

  • It looks polished and professional. One can easily see that very talented designers had their say in the development of BizLaf.
  • It is extremely easy to integrate and use. Simply call the standard UIManager.setLookAndFeel() method and then set a “style” on your components.
  • It is very fast. According to Centigrade this is because it runs on top of their L&F engine “Cezanne”. I can confirm that it performs excellent even on my old company laptop running Windows XP.
  • It uses a semantic approach, which means that BizLaf “knows” whether a panel is just a simple panel or a toolbar, or a header, or a status bar. Each one of them will be rendered differently.

The following screenshot shows the result of my transition to BizLaf. I am very pleased with the result and no longer have to worry that Collapp will run on Mac only (missing out the other 90% of the market).

collapp and bizlaf

Collapp action item list using BizLaf

Usage

Using BizLaf requires a little bit more code compared to other look and feels. In this sense it is actually not “pluggable” because of the extra code required. However, considering the benefits I believe this is an OK price to pay. In my code I now often see statements like this:

JPanel panel = new JPanel(); 
if (Collapp.isAqua()) { // runs on MacIntosh 
 panel.setBackground(Color.LIGHT_GRAY); 
} else { // runs on other platform 
 BizLafControls.get().setStyle(panel, BizLafStyles.HEADER); 
} 

In this example you can see “semantics”. BizLaf makes the panel look like a header panel. Currently there is not a lot of documentation for BizLaf as it is still in an early access state, but the PDF files that contain annotated example screens are really all that you need.

Summary

To wrap this up. I can highly recommend BizLaf as your look and feel of choice if you are in the market for rich client applications that need to satisfy high-end demands. The price for BizLaf varies between 1,800 Euros for the “Basic” license and 8,000 Euros for the “professional” version. The difference is in the support and also, and this is important to know, in the feature set. For example, the “Search Field” style for text fields is not part of “Basic”.