Developing SWT applications using eclipse
While SWT is integrated as part of the Eclipse plug-in API, for standalone
Application development it is best to develop against the SWT Standalone
Download. This document will help you get set up.
First, download the. Zip of SWT for your platform from
SWT Homepage
.
The SWT. ZIP file can then be imported into your workspace. In
File
Menu, chooseImport
And select
Existing projects into Workspace
Wizard.
(In newer versions of Eclipse, you can findExisting projects into Workspace
InGeneral
Category ).
Direct the Wizard to the location where you downloaded the. ZIP file.
This will create a project calledOrg. 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 onJava
Build path
Page, include the org. Eclipse. SWT project.
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 selecting
Run> Run as> JAVA application