Building a GUI: Events and Listeners
In the second phase of the GUI building process, the focus is on the feel of a GUI. To achieve this feel, you'll work with the windowing toolkit's events and listeners. After you've integrated this feel with a GUI's look, you're almost finished. (All that is left is to test your GUI.)
Exploring Events
An event is fired when a user presses a button, scrolls through a list of textual items, makes a selection from a menu, moves the mouse, presses a key, and so on. These events originate with the component's peer and are forwarded by the windowing toolkit to a corresponding object. This object is understood to be the source of the event.
The windowing toolkit associates events with objects that provide descriptive ...
Get Special Edition Using Java 2 Standard Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.