Geertjan's Blog

  • January 19, 2007

UI Fidelity and Elliotte Rusty Harold

Geertjan Wielenga
Product Manager
Way back on Wednesday August 03, 2005, in this blog, I praised Elliotte Rusty Harold's great Processing XML with Java. I've learnt a lot from it (and I make use of it at least once or twice a month), all from the online version of the book, though I've seen the hardcopy of the book lying around in various places here at Sun in Prague. Then today I saw in Alex's blog that Elliotte Rusty Harold has had some nice things to say about NetBeans and Swing. So I clicked the link and read the nice comments. I think the comments are so nice (and come from such a highly respected member of the Java community) that it deserves to be repeated in bold. First Elliotte starts out with some misgivings. Then he says, and here it is in bold:

...comparing UI to UI, NetBeans is now way ahead of Eclipse. The claim that SWT provides a more native looking interface than Swing is demonstrably false. In fact, exactly the opposite is true. I'm sure it doesn't hurt that the NetBeans team has a significant portion of Mac users, and the Eclipse team has none (or so close to none that I can't tell the difference).

Will this be the final word on the eternal "UI fidelity" debate? Probably not, because there are still people out there who like keeping the discussion alive as if the jury is still out (a miniature version of the jury supposedly still being out on global warming and on the harm that nicotine causes, but only according to those in whose interest it is to claim that those discussions are still alive). However, for the rest of us -- lets stop the "UI fidelity" debate in the SWT/Swing discussion. Sure there are differences, and sure there are things that are better in one over the other, but "UI fidelity" is no longer one of them.

Anyway, thanks Elliotte, I hope you'll end up enjoying NetBeans (whether or not you decide to switch) as much as I've enjoyed your great book.

Join the discussion

Comments ( 7 )
  • Jacek Friday, January 19, 2007
    I have to admit, NB on JDK 6.0 looks phenomenal on Windows.
    However, the first time I run it on Linux was awful. Metal L&F, poor rendering of fonts, etc. Looked even worse on a KDE-based distro.
    Hope NB will not forgets its Linux users when it comes to fidelity as well.
  • x Friday, January 19, 2007
    Jacek: what you are seeing is the very reason why the Swing approach cannot work in the long run. Because they have to emulate the native widgets every time a new version is released, they are constantly falling behind.
    SWT/JFace doesn't have this problem, which is why interfaces written in SWT are usually not only snappier, they \*are\* using the native controls (see the terrible time that Swing keeps having with the file dialog on all platforms, for example).
  • Ramon Friday, January 19, 2007
    Jacek, UI Fidelity in NB is a work in progress, see the screenshot form my blog entry from november.

    x: I think you are not the only one who haven't got the news.
    From Chet Haase's Blog:

    "In Java SE 6, the Swing native look & feel for both Windows and GTK was re-written to use the native platform rendering engine to draw Swing widgets. Instead of our old approach of using the native resources and doing our own rendering, we actually call the native rendering system to draw the widgets for us (on Windows, this is done through the UXTheme API). This means that we are finally able to achieve true native fidelity for these components because, by definition, our components are drawn in the same way that the native components are."
  • Jacek Friday, January 19, 2007
    I am actually running with JDK 6.0. Under Ubuntu it was actually pretty good (after I forced NB to use the GTK L&F). But after I switched to OpenSuse, it was real bad...even the font sizes were not respected (while other GTK apps respected the KDE font sizes and color schemes) and the font antialiasing was atrocious. But I guess that is not really an NB issue, more the JDK itself.
    It's just a pity Sun has aligned itself with GTK/Gnome, where IMHO KDE is just a better designed and productive desktop environment. Oh well, I guess I will just have to accept it.
    And BTW, SWT doesn't handle Qt/KDE either, so that is not an argument in its favor either. And I am guessing it would be faster to create an equivalent KDE L&F than port the entire SWT to run on top of Qt...so actually SWT would be at a disadvantage here.
  • Ramon Friday, January 19, 2007
    Jacek, someone may tell you that SWT does handle KDE. Look at the first (rather crappy) shot from here:
  • Jacek Friday, January 19, 2007
    Interesting. Is that an actual Qt port of SWT, or just GTK running with a theme that corresponds to the current KDE theme?
  • Ramon Saturday, January 20, 2007
    Don't know the story behind that.
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.