SWT Examples are useful little programs that are written in SWT. These are typically much larger and more comprehensive than SWT Snippets.
The following SWT Examples can be downloaded from the Eclipse download page:
ControlExample, CustomControlExample, LayoutExample, and PaintExample are also available as Eclipse plugins, and the following examples are only available as Eclipse plugins:
There are several ways to download and run the SWT examples:
eclipse/plugins/org.eclipse.swt.examples.<exampleName>.source_<version>.jar.
Alternatively, you can use these (more detailed) steps from the Eclipse ISV doc to download, install, and run the Eclipse SWT Examples:
(NOTE: these instructions will only work for Eclipse 3.3 and newer) To run the ControlExample or CustomControlExample standalone:
org.eclipse.swt.examples_<version>.jar, and extract it in place.<pathToYourJRE>\bin\java -classpath <pathOfYourPlatformSWTjar>;.\swtexamples.jar org.eclipse.swt.examples.controlexample.ControlExample
This is the ControlExample. There is a tab for each control, and you can change the various styles, etc, to see what changes in the controls. To run the CustomControlExample simply use the class name CustomControlExample instead of ControlExample in step 6.