O'Reilly logo

Graphic Java™ 1.2, Volume I: AWT, Third Edition by David M. Geary

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

The Big Picture

All of the action, as far as events and listeners are concerned, starts in the java.util package. java.util comes with a class and an interface—EventObject and EventListener, respectively, which form the foundation of the delegation event model. EventObject is a simple class that does nothing more than keep track of its event source, and EventListener is a tagging[1] interface, which all listeners extend. EventListener and EventObject anchor hierarchies of listeners and events, respectively. Figure 9-3 shows the event listeners, all of which extend the java.util.EventListener interface.

[1] A tagging interface does not define any methods.

Figure 9-3. Event Listener Interfaces. All of the event listener interfaces shown above reside ...

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