SWT example - Paint Tool
This example demonstrates the use of SWT graphics operations in the form of a
rudimentary bitmap painting program. The Paint 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 to set the foreground color, right-click to set the
background color.
Running the example
Follow the
SWT standalone examples setup
instructions to install and run the example from your workspace.
The "Main" class is org.eclipse.swt.examples.paint.PaintExample
.
This example can also be run using the
Example Launcher.
Select the Paint item from the Workbench Views category and click Run.