Tutorial - Step by Step

0. Setup the Sample Project

In this tutorial, the address book distributed as on of the SWT examples will be used to illustrates various steps.

You can download the sample project from http://webstart.sourceforge.net/AddressBook.zip and extract it to your workspace then restart eclipse, or you can create it manually following instructions below.

First, create a project and import the source code of address book (You can find the source files at: [ECLIPSE_INSTALL_DIR]/plugins/org.eclipse.sdk.examples.source_3.0.0). You also need to add SWT.jar as the library, which is located at [ECLIPSE_INSTALL_DIR]/plugins/org.eclipse.swt.win32_3.0.0/ws/win32 for Windows. The resource bundle is needed in order to run the application, you can extract examples_addressbook.properties from the jar [ECLIPSE_INSTALL_DIR]/plugins/org.eclipse.swt.examples_3.0.0/swtexamples.jar. Now, we have the sample project: