SWT Example - Paint Tool

This example demonstrates the use of SWT graphics operations in the form of a rudimentary bitmap painting program. The Airbrush Tool implementation also demonstrates a mechanism for managing timed GUI operations in the background that are triggered by user input.

Select a tool with which to draw in the drawing area. There are a number of tools to choose from on the toolbar. To change the color selection, click on a color in the palette below the drawing area: left-click for the foreground color, right-click for the background color.

Uses SWT's GC and FontDialog, and JFace's InputDialog and action set support.

Running the example

From the Window menu select Show View --> Other. In the Show View dialog, expand SWT Examples and select the view named Paint. A view titled Paint will appear in your current perspective.

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