Section 12.8 How Event Handling Works

• When an event occurs, the GUI component with which the user interacted notifies its registered listeners by calling each listener’s appropriate event-handling method.

• Every GUI component supports several event types. When an event occurs, the event is dispatched (p. 494) only to the event listeners of the appropriate type.

Get Java™ How To Program (Early Objects), Tenth 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.