Developing SWT applications using Eclipse
While SWT was integrated as part of the Eclipse plug-in API, for standalone application development It's best to develop a Gainst the SWT standalone download. This document would help you to get set up.
First, download the. zip of SWT for your platform from the SWT homepage.
The SWT. zip file can then is imported into your workspace. The File menu, chooseImport and select the Existing Projects into Workspace Wizard. (in newer versions of Eclipse, you can find Existing Projects to Workspace in the General category).
Direct the wizard to the location where you downloaded the. zip file. This would create a project called ORG.ECLIPSE.SWT in your workspace.
Your Java projects can then add the SWT project as a dependency. Open the properties dialog of your Java project, and on the Java Build Path page, include the ORG.ECLIPSE.SWT Pro Ject.
With the SWT project as a dependency, you can now benefit from Eclipse features such as the Javadoc View and code assist.
Now you can run any main class in your project by selecting the class and then selectingRun > Run as > Java Appl Ication