Skip to main content

Paradigm Swing

Posted by diverson on March 12, 2007 at 2:53 PM PDT

It's a beautiful spring (the season, not the framework) day here in Colorado so I can't help but be in a good mood as I begin to look forward to JavaOne (the first one I will actually be attending) and bid a fond farewell to the first, but hopefully not last, Desktop Matters conference.

At least one thing became clear at the Desktop Matters conference last week. The way that we write Swing applications is changing for the better. A few other things that became clear are that Chet has a great sense of humor to go along with a lot of patience for friendly ribbing; Hans really is a nice guy; and Romain has a startling talent for video clairvoyance (Chet, that race car demo was, quaint).

Almost gone are the days when every new Swing programmer will be left on their own standing in front of the huge maze of Swing with only the "Abandon hope all ye who enter" sign for company. Those of us who still remember our first Swing program probably remember something like this:

public class MyFirstReallyCoolSwingApp extends JFrame {

  public static void main( String[] args ) {
    myApp = new MyFirstReallCoolSwingApp();

EDT? Isn't that a home pregnancy test or something?

So much for the old paradigm. A paradigm is only worth about 20 cents, anyway.

Alrighty, moving right along then.

These days there is, and has been for some time now, actually, a new life and energy behind desktop Java. Personally, I think this resurgance can be traced pretty easily if we look back now. I think we can thank Eclipse for showing the way. It came along at just the right time and provided us not only with the great Java development tool but also with the prototypical example of a great Java desktop application. Of course Eclipse simply could not have been so successful without the improvements made to the Java platform in general.

That brings us to another thing that became clear to me at Desktop Matters: there are a lot of very smart people working at Sun. Okay, I haven't actually met very many of them, but this is certainly true of the Swing team.
I am extrapolating from there.

A short while later, Netbeans 5.0 put the lie to the "Swing is slow" line. It became abundantly clear to anyone who was really paying attention that desktop Java was an increasing priority at Sun. The release of all those desktop-related improvements in Java 6 was yet another data point in the rise of Swing's stock. And after hearing the Swing team talk about their plans for the future, it looks to me like things are still trending upwards.

It is not clear to me what the business case is for this renewed commitment Sun has for desktop Java. What return does Sun expect on their investment? It certainly seems like there has been more corporate support but perhaps what we're seeing is simply the result of the energy and dedication of a small but talented team of Swing engineers? As just an outsider looking in, I won't pretend to know. But I'm also not going to look a gift horse in the mouth because, darn it, I really enjoy Swing programming.

I love the flexibility of Swing. I love the power of Java2D. And there is some great work going on in SwingLabs. Now I'm not a Java2D wizard like Chris, I can't design ultra cool interfaces like Romain, and I certainly can't time things as well as Chet, but I do know that Swing will be a lot nicer to work with very soon thanks to JSRs 295 and 296 along with the support for them that is going into Netbeans. And this will apply to novice and experienced programmers alike.

This year looks like it will be a continuation of the rise in excitement surrounding desktop Java. With the release of the Filthy Rich Clients book and the Netbeans RCP book as well as the upcoming focus on media, 3D, animation, and deployment in JDK 7, I just can't wait to see what we'll be talking about at next year's Desktop Matters conference.

And one last thing. Since we were on the subject of my interface design impairment, do you suppose there is any chance of Romain putting together a UI design video podcast. You know, kind of like "Romain's Eye for the Programmer Guy" or something? Maybe that's not a good title. The pronunciation of the last word would always be in question.

Related Topics >>