SWT Standalone Example - Hello World

The Hello World examples are a set of introductory examples to show how to get started creating an application with SWT. They cover creating a shell, using event listeners, processing events in an event loop, using layouts, and drawing with a Graphic Context.

Hello World 1

This example demonstrates how to open a Shell and process the events.

Hello World 2

This example builds on HelloWorld1 and demonstrates how to display a Label inside the Shell.

Hello World 3

This example builds on HelloWorld2 and demonstrates how to resize the Label when the Shell resizes using a Listener mechanism.

Hello World 4

This example builds on HelloWorld2 and demonstrates how to resize the Label when the Shell resizes using a Layout.

Hello World 5

This example builds on HelloWorld1 and demonstrates how to draw directly on an SWT Control using a graphic context.

Running the example

Follow the Manual 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 the Hello World item from the Standalone category and click Run.

Copyright IBM Corporation and others 2000, 2002.  All Rights Reserved.