A peek into the Standard Widget Toolkit (SWT)

Before we start the real thing about Eclipse RCP, I think it’d be useful to get a closer look to SWT, the Standard Widget Toolkit, that is the GUI toolkit Eclipse is based on. Apart from the Eclipse thing, SWT can be used standalone to build simple application GUIs, and this is what we’re going to talk about here. I’m going to give you an overview of its main features and limits, assuming that you already had some experiences with graphical user interfaces in Jaa.

The main difference between Java Swing toolkit and SWT is that the first one is entirely written in Java and most of the user experience is perfectly identical among different OS, while the second one is made up of two parts: a Java library and a system library. The Java library is (almost) the same among all systems, and the system library obviously is different from OS to OS. For this reason, SWT applications perfectly integrate in the operating systems environment, but the user may experience slight changes depending on the OS. That’s why a cross-check among different systems may be required.

What we’ll be doing here is an overview of what SWT programming means. I’ll put some bibliography to go into details inside the article.

For the following examples, we’ll be using Eclipse for the development process and I’ll assume that you’ve already taken my suggestion and you’re an expert already :P
Start a new Eclipse Java project and add a new Library variable to the classpath that contains every jar in your plugin directory with a file name containing “SWT”.

Read more of this post

Follow

Get every new post delivered to your Inbox.