Skip to main content

Swing: People still aren’t getting it!

Posted by jonathansimon on May 10, 2004 at 2:23 PM PDT

So far, of the people I’ve brought in, no one has been able to answer a simple Swing threading question. Several even suggested to use SwingUtilities.invokeLater() for expensive work - not knowing it’s actually executing in the Swing thread. I’m making a point of this because it highlights a disconnect between the design of the Swing API and its users.

Is the Swing API too complicated? Maybe. Programming in VB is a lot easier. But is that the goal? There has been some talk about making a façade or wrapper around Swing. Interesting.

What about the user base. Should Swing only be attempted by devoted "Swingers"? I've seen that casual developers have a pretty hard time, or just simply do things wrong or inefficiently (this also leads to misconceptions of performance, etc.). If this is the case, it goes against the Java Desktop initiative. If Sun wants Java running on desktops everywhere- Swing has to appeal to all walks of life- not just the hard core types.

What about communication. Maybe the documentation is a problem. Do JavaDocs not cut it? Maybe this isn’t an API issue. I happen to think that JavaDocs is great at helping you understand the API - but don't necessarily help you use it properly. Maybe something is needed in addition to JavaDoc. Maybe a format for simple example applications is in order, or just a high quality repository for Swing applications that people can learn from.

Just to wrap up: Either the Swing API is too hard to use, there is a misconception about the user base, or Swing is poorly explained. Either way- there is a big community disconnect and I think a lot of people don’t “get” Swing. For Swing (and desktop Java) to be sucessful, we have to nail this once and for all.

Related Topics >>