When the Java programming language first became publicised, it was heralded as the dawn of a new age of writing cross-platform programs. “Write once, run everywhere” they said. Now, 16 years after 1996, which was roughly when the Java hype started, I’d like to check if it delivered on this promise, by seeing if one can easily write a cross-platform GUI (= Graphical User-Interace) application using it. What I’m looking for is a Java GUI library that: 1. Compiles. 2. Is cross-platform. 3. Does not suck. Teaser: I was not able to find one.
The standard Java SWING toolkitis out-of-the-question due to its weird look and feel and crappy behaviour everywhere. Joel on Software has this to say about SWING:
If you still think that something as small as how long you hold down the Alt key when you activate a menu command doesn't matter, well, your software is going to make people unhappy. These tiny inconsistencies are what makes Swing applications so unbearably annoying to use, and in my opinion it's why there are virtually no commercially successful Java GUI applications.
I too have been frustrated by the unusable Java SWING GUIs, and in one of the latest projects I am contributing to, which has already been written in Java, I ran into a particularly buggy SWING UI.
The Eclipse people implemented something called SWT, but according to the wikipedia, it has several limitations, and require writing a lot of platform-dependent code.
Next are the Qt bindings to Java - Qt Jambi. These require customising the build.properties (whereas the error and documentation says one should edit the buildpath.properties file), and after that fails compiling with this error:
[make] ../../generator/out/cpp/com_trolltech_qt_core/ qtjambishell_QFutureIterator.cpp:21:15: error: no matching function for call to ‘QFutureIterator
Next I looked into java-gnome, but apparently it does not work on Windows, so it's not cross-platform.
So I think that leaves us with nothing. How sad. Compare that to the comprehensive coverage of Mono’s GUI toolkits, many of which are cross-platform, and to the situation in other languages such as Perl or Python, and you'll see that Java sucks the most in this respect.