Chapter 11. Event-driven programming

Event-driven programming

11.1 Interaction with text fields

11.2 Events, listeners and handlers

11.3 Case Study 5: The Flag Designer

11.4 Managing sequences of events

11.5 Case Study 6: Supermarket Till

11.6 Case Study 7: The Converter with Swing

Clearly, responding to events is an important part of GUI programming. Java’s awt.event package provides the means for listenening for events, recording information about events as they occur, and linking up to user-defined event handlers. In this chapter we consider:

  • how are events classified and corresponding listeners and handlers set up?

  • how can sequences of events be managed?

In preparation, we start ...

Get Java Gently, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.