Rietta.com Security logo
You are reading The Rietta Blog, a publication about the web since 2005.

SWT and Swing in the News, Again.

It seams that the SWT vs. Swing is back in the news. Maybe it has never gone away but I have simply not noticed it as most of my work in the last year has either been doing packet inspection with C or simple scripting - aka no significant Java work.

On the Thought: Gosling on SWT, “…Gosling says AWT == SWT. That’s sort of true but less true than more. The big difference between the two is AWT is very much least-common-denominator across all platforms. SWT isn’t. The other significant difference is AWT chose to hide the emulation layer in C. In other words, java.awt.Button is the same on all platforms, while the native peer differs on each platform. One of the consequences of this is porting is harder, some things are in Java, some aren’t. It also makes for a larger footprint because a java.awt.Button has fields for it’s size, bounds, etc that the OS also has….”

It seams that the primary argument against Swing is that it is slow and not true to its host platform. It also seams that the primary strength of SWT is also its weakness as it has to maintain multiple native implementations for the same functionality.

I came across an interesting article in OS News on a “SWT vs. Swing” which seams worth the read. “…over the relative merits of SWT and Swing.” Of course you may want to see the OS news comments on the topic.

I suspect I will be finding this topic of more interest if and when I start working on Java-based GUI applications more. I happen to like both Eclipse and NetBeans as Java development environments; even though gvim also works.

Of course QT is also very impressive and may not be a bad choice at all for building cross-platform software which targets Windows, Mac, and BSD/Linux.

About Frank Rietta

Frank Rietta's photo

Frank Rietta is a web application security architect, author, and speaker. He is a computer scientist with a Masters in Information Security from the College of Computing at the Georgia Institute of Technology. He speaks about security topics and was a contributor to the security chapter of the 7th edition of the "Fundamentals of Database Systems" textbook published by Addison-Wesley.

If there is a topic you would like us to cover,