The Hello World examples are a set of introductory examples that show how to get started on creating an application with SWT. They cover the creation of a shell, the use of event listeners, using layouts, processing events in an event loop, and drawing with a Graphics Context.
This example demonstrates how to open a Shell and process the events.
This example builds on HelloWorld1 and demonstrates how to display a Label inside of the Shell.
This example builds on HelloWorld2 and demonstrates how to use a listener mechanism to resize the Label when the Shell size changes.
This example builds on HelloWorld2 and demonstrates how to use a Layout to resize the Label when the Shell size changes.
This example builds on HelloWorld1 and demonstrates how to draw directly on an SWT Control using a Graphics Context.
Follow the SWT standalone examples setup instructions to install and run the example from your workspace.
The "Main" class is org.eclipse.swt.examples.helloworld.HelloWorld[1-5]
.
This example can also be run using the Example Launcher. Select one of the Hello World items from the Standalone category and click Run.