posted by Andy Roberts on Thu 19th May 2005 19:33 UTC
IconJava Swing comes with "pluggable look-and-feel technology", which essentially boils down to the fact that interfaces can be "skinned" (although this is simplifying a tad) and is therefore, extremely flexible. By default, Java ships with a cross-platform look-and-feel (LAF), which means your apps can look consistent across all platforms, or LAFs that mimic the look of a specific platform, say Windows, for example. However, one of the chief complaints of Java desktop applications is its "look". It basically stems from two issues:

  1. The default cross-platform LAF is "ugly".
  2. The platform specific LAFs lack fidelity, i.e., they're not convincingly native.

To be honest, they have a point! That's not to say that there aren't many devs (and users) out there who are happy with the LAFs Java ships, but there is work to be done. However, this isn't the end of the story. Java GUIs can be made to look great. Also, is the issue of platform fidelity really as big an issue as many developers think?

Native look and feels

There are many Java developers who program with only the Windows platform in mind. They often feel disappointed that the Windows LAF bundled with Java doesn't do an adequate job of looking like a Windows application. However, does this really matter? Let's look at Microsoft software for example. Take Microsoft Office, Microsoft Media Player and Microsoft Messenger. Three extremely popular pieces of software for Windows, written by Microsoft. Yet, the irony here is that MS themselves have taken great effort to deviate away from the normal Windows look (and from a intra-MS perspective, their own products also deviate from each other, where Office looks different to Media Player, which looks different to Messenger, and so on). And they aren't the only ones.

Screenshot showing MS Office, Media Player and Messenger. All of which deviate from the Windows look and feel.

I queried Romain Guy about this issue. He's an experienced developer and commentator on UI design, and recently started an internship at Sun working on LAFs, (NB all views expressed here are his own, and not of his employer!):

"These LAFs should have helped delivering a better desktop experience. Unfortunately they completely failed, mainly on Windows. Since Swing does not rely on any native widgets, LAF developers need to recreate them all by themselves. And it is very hard to duplicate the look and behaviour of a widget when you don't have access to its source code. Windows LAFs have always been awkward: they almost look and feel like Windows, but not exactly. A lot of people protested against that. Funnily, they are mainly Windows developers/users. Linux and Solaris users, for instance, are used to seeing mixed toolkits on the screen. You can launch The GIMP and its GTK UI, Mozilla and its very own look and feel, KMail and its QT UI, etc. on the same desktop and nobody will ever complain about it. The Aqua look and feel for MacOS X is quite good so there aren't so many complaints (the LAF has its quirks and there is a project, Quaqua, which addresses these issues).
"Now, Windows folks are just manic about this problem. I sure like to see the efforts of the WinLAF guys who address the Windows LAF issues, but I have a lukewarm opinion about this. See, I never liked Java's Windows LAF precisely because it looks awkward. What's the big deal? I used other look and feels instead. Now, a lot of people will tell you that it is a bad idea because your application would then not look like a native one. So what? I won't use the well-debated argument of Winamp and iTunes for Windows, but I will rather use most common examples. Microsoft keeps changing the look of Office, does anyone complain? WinForms.NET widgets don't look exactly like the widget we're used to see, does anyone care? Delphi has brought us a lot of odd-looking components (like the ugly green-ticked Ok button) for years and nobody cares. Even Firefox and Thunderbird don't look totally native. Oh, and what about Photoshop? The list goes on. I'm staring at my Windows taskbar right now and out of 7 launched applications, there are 6 not looking totally (or not at all) native. And Winamp isn't even started (neither is iTunes).
"Tell me why this should be different for Java?! Worse, it is the developers who are actually complaining about that. Not the users. Don't misunderstand, I would love having a perfect or close-to-perfect Windows look and feel, but as far as I'm concerned, it's not that a big deal."

Some interesting points here. Why is there so much fear from developers that Windows users won't cope with Java LAFs, when companies like Microsoft itself disprove this? As mentioned, Linux users are less concerned by this issue because they typically use a myriad of applications which may use different UI toolkits. Some may argue that Linux users tend to be more computer savvy, and thus are less worried about differences in aesthetics. It's the less experienced users who are thrown on seeing alternative looks (regardless if it's an improvement or not) as unfamiliar and therefore a Bad Thing.

For Windows at least, there is the WinLAF project which provides the most consistent LAF to the Windows platform as a library that can be easily employed by Java applications. Then there's always SWT, which uses native widgets of a given platform, but that's a different kettle of fish to Swing and beyond the scope of this article.

Ugly look and feels

I think this is the crux of Java's reputation on the desktop. I personally do not think that the lack of fidelity is that important. I simply think that people feel Swing is ugly - at least relatively speaking. Romain (candidly) sums up his feelings here:

"... Let's be clear, Java's default look and feels suck. Really. I never used the native ones because I always found them worse that the known-to-be-ugly-Metal one. Things have become a little better with the introduction of the Windows XP look and feel. It doesn't suck, it is just awful :)"

But does this really matter? Don't forget, good UI is much more than aesthetics, it's about making the user able to perform a task efficiently. Romain elucidates,

"To be honest I'm very sensitive to GUI aesthetics. I could even prefer an application over another because it looks better, even though it is worse feature-wise. In fact, aesthetics are not that important in a GUI. Ergonomics are. A nice-looking GUI can help you appeal to potential users but it otherwise it doesn't really matter. Now, it greatly depends on what kind of application you are referring to. Applications used 8 hours a day by people who need to input kilometres of data don't need to be eye-candy, they need to drive the user efficiently. That means an eye-candy GUI can be as bad as an ugly one. Just imagine using a word processor with any Winamp skin, would you be able to use it all day long? I don't think so."

Now, I agree in many respects with Romain here because I too like a good looking application - it simply has greater appeal; it gives a good first impression and makes you feel comfortable. In today's IT world, I think users' expectations are higher in this respect, and so expect something easy on the eye. So, will we ever have good looking Java applications? Well, yes, we already do!

Table of contents
  1. "Java look and feel, Page 1/2"
  2. "Java look and feel, Page 2/2"
e p (0)    89 Comment(s)

Technology White Papers

See More