Standard Widget Toolkit (SWT) Standalone Example - Hello World

Introduction

The Hello World examples shows how to create a shell, use listeners, process events, and use SWT controls.

Running the example

If the Example Launcher is installed, select the Hello World [1-5] item from the Standalone category and click Run.  Otherwise, install and run the example manually as per the Standalone Examples Manual Setup instructions.  The executable classes are org.eclipse.swt.examples.helloworld.HelloWorld[1-5].

Details

Hello World 1

This example demonstrates the minimum amount of code required to open an SWT Shell and process the events.

Hello World 2

This example builds on HelloWorld1 and demonstrates the minimum amount of code required to open an SWT Shell with a Label and process the events.

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.

Copyright IBM Corporation 2000, 2001.  All Rights Reserved.