Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

>I have been building GUI applications with Java and Swing for some time. I am willing to go on-the-record and state that Swing provides a reliable and thorough cross-platform GUI toolkit.

Swing is used by two kinds of people: developers, because the tools that use it are just too good to go elsewhere (IntelliJ etc) and enterprise users that have it forced upon them.

I don't think anybody is using Swing willingly -- or enjoying it. Besides the "uncanny valley" effect to native widgets, it suffered from the start from the main negative of Java's culture: it was overengineered. On top, it underdelivers in many areas.



>I don't think anybody is using Swing willingly -- or enjoying it. Besides the "uncanny valley" effect to native widgets, it suffered from the start from the main negative of Java's culture: it was overengineered. On top, it underdelivers in many areas.

Just out of curiosity, what other gui tool kits have you used that you compare Swing too? I always wonder what gui toolkits those who decry Swing have experience with.

Myself, I've used Win 32 api, MFC, SWT, and gtk. Imo, Swing is by far the best of those; relatively consistent api, a wide variety of widgets, customizable, ... True it can be very complex (ie editor kits) and some things are/were missing for a long time (close buttons in tabbed panes). Also true that it doesn't look 'native' on all platform, but no gui tool kit can. I have not used Qt, but it seems to be equivalent to, or surpass Swing in all those areas.


>Just out of curiosity, what other gui tool kits have you used that you compare Swing too? I always wonder what gui toolkits those who decry Swing have experience with.

I've used Cocoa, GTK on Linux, and Windows Forms (or whatever .NET v1 and v2 had called) in Windows. Have also used Swing.

Quality of results wise, Cocoa beats them all down, but single platform unfortunately. The .NET solution was also nice, but limited to a single platform too. (I know of, but don't care for small-time hacks to make Cocoa/.NET play on other platforms, only for officially supported projects).

Swing had been a pain in the ass to create UIs with, overengineered, with missing functionality (how long did we have to wait for a HTML control?) and ugly too boot.

Swing has one thing going for it: it does work on all platforms. I just wish it was better designed (API wise), more complete, and less uncanny valey-ish.


It may be over-engineered, but it's easily available, at hand, when you need it.

The only cross-platform GUI toolkit that I loved working with and that does a much better job than Swing is Qt. Unfortunately Qt is C++ and it's not even standard C++. So language bindings are hard to build and (compared with Gtk) working with C++/Qt is not so painful. The bindings for Mono are dead. Trolltech released at some point Qt Jambi, the Java bindings, which were awesome, unfortunately the Java community hasn't been interested in it, so Qt Jambi also died after Nokia acquired Trolltech - for the moment at least (the wonderful thing about open-source stuff is that it can be revived with enough interest). The only well maintained language bindings for Qt is PyQt.

And yes, building the UI using the platforms native stuff yields better results, but it's also more expensive to do so. We're all moving in that direction anyway, given the emerging mobile platforms. Sometimes I'm thinking that for desktop apps it's just better to embed a web browser and build the UI with HTML/CSS and JS.


>It may be over-engineered, but it's easily available, at hand, when you need it. The only cross-platform GUI toolkit that I loved working with and that does a much better job than Swing is Qt.

Both statements I agree with!

I think it's a sad state of affairs, that the tens of billion s IT industry, and the whole OSS community, cann't produce, and maintain, a decent, cross platform UI, based on C with hooks for various languages.

GTK has dropped the ball even on Linux (Mac/Windows support is crap, and the library is essentially what it was 10 years ago content wise).

wXWidgets is at the same level more or less.

QT is nice, but is C++, so you either by into the whole thing or you face the not so good support and bindings to other languages (Python has the best support, but even that is mediocre).

Mozilla's XUL was never wrapped and maintained properly (as once promised), to be use to use for cross platform development.

SWT needs Java, and is too tailored to Eclipse's needs.

I, for one, don't need native look in all apps -- I could do with something like the cross platform widget library Adobe built for Lightroom -- that and a webkit view.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: