As previously mentioned, SWT is a widget toolkit for Java. A widget is a GUI element developed to provide interaction with an user. Text, labels, lists and buttons are examples of widgets. For making use of widgets and getting started with the development of SWT applications, some configurations must be performed, as described in the next section.
Although SWT is integrated as part of the Eclipse plug-in API, for older versions or for the development of standalone applications, it may be necessary to download the standalone SWT.
For that, one must go to www.eclipse.org/swt. After selecting the appropriate version (in our case swt-4.2.1-gtk-linux-x86.zip
), it is necessary to import the downloaded file into Eclipse by going to File | Import... | Existing projects into workspace | Select archive file, and by hitting the Browse button to locate the SWT library file, as it is shown in the following screenshots:
After these first...