Skip to main content

A Harness for Swing

Posted by eitan on May 4, 2006 at 5:36 AM PDT

I was thinking about this a while back and it struck me as interesting that as a GUI toolkit, Swing is different from a number of other GUI toolkits out there that were born out of the need for creating a graphical desktkop system. Namely, GTK has GNOME (and Xfce), Qt had KDE, and MFC has Windows.

What does Swing have? SwingSet2? Not really. There are indeed thousands of rich Swing applications that exercise Swing. NetBeans being a very serious one developed by Sun, the same organization that develops Swing. One could also say, "look SWT doesn't have a desktop either, they just have Eclipse." So, you are right, it's not fair to make such a comparison. Nevertheless, it does not mean that it would be a bad idea to have such a project drive the evolution of Swing going forward.

There's nothing like a full-fledged desktop system used by thousands of people daily to serve as a complete harness for a robust GUI API. A desktop system probably exercises all facets of such a toolkit:

  • Does the toolkit provide a complete suite of widgets that can support a very dynamic user interface?
  • Are the widgets rich enough? Are they flexible enough?
  • Is the performance of the toolkit's components being put to the test on a regular basis?
  • How well do the components interact with each other?

I see an interesting development going forward. I recall reading that someone has ported most of GTK to MacOSX. That is, very soon, Apple users will be able to run GTK apps alongside their Cocoa apps. It is my understanding that GTK also works on Windows. Swing has been in a unique position for a while of being able to run multiple platforms. Others are catching up. And they do have some advantages, having multiple language bindings possibly being one such advantage.

In all fairness, I should mention an excellent project out of France whose goal is to create a desktop system for Java written in Swing: JDistro. What I'm really interested in is a stronger coupling, a stronger feedback loop between two teams: one developing a Swing Desktop System, and another supporting its development by making improvements in the Swing toolkit.

Related Topics >>