O'Reilly logo

J2EE™ and Beyond: Design, Develop, and Deploy World-Class Java™ Software by Art Taylor

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Java GUI Event Handling

When users interact with a GUI application, they perform actions that include but are not limited to moving the mouse around the window, clicking buttons, moving sliders, selecting checkboxes, and entering text into fields. All of these actions must be handled by the application.

To simplify the process of handling these actions, the AWT provides an event-handling mechanism, which has the component generating the event register an event handler for that specific event. These components effectively delegate the responsibility for handling these events to other classes, which is why this approach is referred to as the delegation model.

Using the delegation model, the client handlers are registered with the GUI component ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required