June 2005
Beginner to intermediate
336 pages
6h 29m
English
Take a look at the example in Figure 8.3, ButtonProject.java, which is designed to show how to handle events in SWT applications. When you click the button in this project, the application catches that event and then the message “Thanks for clicking.” appears in the Text widget.

This application starts by creating the Button widget it needs, giving it the caption “Click here,” and making it a push button (the allowed styles are SWT.ARROW, SWT.CHECK, SWT.PUSH, SWT.RADIO, SWT.TOGGLE, SWT.FLAT, SWT.UP, SWT.DOWN, SWT.LEFT, SWT.RIGHT, and SWT.CENTER):
import org.eclipse.swt.*; ...
Read now
Unlock full access