Nothing ventured, nothing gained

a blog by Marc Chung

Learning SWT

»

by Marc Chung

From the java part of the brain.

Getting started with a new framework is not an easy task, especially if it’s a UI toolkit such as Eclipse’s SWT. One way, I’ve found, that works with me is to peruse snippets of code that get straight to the point. The org.eclipse.swt.snippets project in the Eclipse CVS repository does just that. The project, which can be checked out via Eclipse, is an excellent illustration of techniques and UI widgets available to an SWT developer. I highly suggest you check out the project and run each snippet. Ok, maybe not each snippet, but you should definitely spend some time browsing them.

For instance, Snippet231 illustrates an SWT Table with multi-line columns. Before Eclipse 3.2, a third party SWT library had to be used to emulate that functionality.

To check out the Snippets project from Eclipse

  1. File > New > Project

  2. CVS > Projects from CVS

  3. Create a new respository location with the following information

    $CVSROOT=:pserver:anonymous@dev.eclipse.org:/home/eclipse

  4. Or just enter the following details

Eclipse CVS Snippet

Viola, you should be playing around with SWT snippets in no time. Visit SWT Snippets for more information.

Want to know more?

I'm Marc Chung, and you're reading Nothing ventured, Nothing gained, a blog about building beautiful software. I'm the founder of OpenRain Software, a web design and development company located in Arizona, where I make millions of users happy by building breathtaking software with brilliant people.

Presentations, Talks, Etc