Fog Creek Software
Discussion Board

I'd like to hear your experience with SWT...

I mostly develop in house applications and I use Swing as my primary GUI library.  However, I've run across mentions of SWT from the Eclipse project ( )many times and I've finally gotten to a point where I have a little breathing room and can spend a some time learning more about it.

On the surface, I like what I see.  Tight integration with the underlying platform, plus support for things like OLE and ActiveX on Windows seem very cool and seem to provide the best opportunity for creating a cross platform library while still creating a GUI that feels natural on whatever OS it's being run on.

However, the types of apps that I'm developing, while in-house, are often non-trivial.  If you've ever implemented things like JTables with lockable columns, rows, and specialized editors or complex Listener interfaces, you probably understand that standard "how-to" tutorials don't really help you a whole a lot in these areas.  Often times, you have to wait until the guys who wrote the library come out with advanced tutorials or you're stuck with code snippets that you have to deconvolute and get working in your own app.

So I wanted to hear your experiences with SWT and I want to know of any good tutorial resources for doing things that I can only classify as "wierd-but-feasible-things-that-people-would-want-to-do-with-higher-level-widgets". (an example of a site like this for Swing is  ).  I suppose that I've already concluded that learning yet another GUI API is worth the time in this case, but I want to make sure that I'm learning as efficiently as possible and have access to the best resources.


Wednesday, April 30, 2003

Your sample swing link does not work

Wednesday, April 30, 2003

Strip the %A20 from the link when it loads.  I wonder if this is a forum bug.

Wednesday, April 30, 2003

I've been working with SWT for a few months now, mostly on the side. I used it to write a sort of Executive Information System for my church, as I am the head of the congregation and needed it to view/manipulate membership data.

I then discovered JFace, an abstraction layer that sits atop SWT that's conceptually kind of like Swing (you can focus on the business object layer rather than the raw widget layer), and I'm writing an XML editor (yes, another one, 'cause the world needs more <g>) using JFace.

Those are side projects. Yesterday, I received an assignment at work that was best answered by an Eclipse plug-in, so I get to play and get paid for it :-)

My experiences overall have been good, although it's been a little slow going, with lots of head scratching and digging to discover how to do things. The Eclipse website has some articles/tutorials that are mostly entry-level, but are good as far as they go. The Javadocs are all there. I noticed two Eclipse books scheduled for May release, but they seem to focus on the tool itself, so probably won't have nearly enough on SWT or JFace.

So, you will likely struggle somewhat at the lack of documentation, but I'd wager that it's worth the effort. Even if you never leave Swing for SWT, it's a fun exercise. I don't want to start any flame wars, but SWT seems to perform more responsively than Swing. Overall, I think SWT is a toolkit worthy of attention.

Rob Warner
Thursday, May 1, 2003

I've been developing for Eclipse for past four months (over the course of my internship).

The experience has been very positive performance-wise (compared to Swing).

As for the lack of documentation, Eclipse IDE which is built using SWT and JFace is free and open-source, so you can dig around for samples right there. The code of IDE takes advantage of virtually every feature that SWT and JFace offer.

Pavel Levin
Thursday, May 1, 2003

Cut and paste the link into the address bar.  It works.  As anon2 says, something got inserted during the formatting of this page to screw it up.

Thanks for the responses, but does anyone know of any nontrivial example sites or tutorials for SWT for things like adding custom editors to Tables?  While the SWT API documentation is decent, there are somethings that I'd rather not have to figure out myself if I can easily avoid it. :)

Thursday, May 1, 2003

Swing has been getting the raw deal lately, when actually it's quite a fine piece of work.
There is some truly sweet things about Swing. It will do everything your little GUI heart desires, and requires no special platform libraries to run.

SWT scratched an itch, and is people's attempt at getting performance with less effort. Swing can do it, but probably takes a little more understanding.

I dig Swing.

Arron Bates
Friday, May 2, 2003

I agree Swing gets a raw deal.  Performance has improved with each new release and I think version 1.4. is finally taking advantage of graphics cards.  My Swing apps on my Windows 2000 box (with real graphics card) seem snappier than Gnome apps on a faster Linux server (sans real graphics card).

Erik Lickerman
Saturday, May 3, 2003

*  Recent Topics

*  Fog Creek Home