A Quick Tour of Common Events

Table 15-1 lists common events and their corresponding event properties. Table 15-2 lists common events and the first component in the class hierarchy to which each event maps. The first thing you may notice in Table 15-2 is that some components are missing, such as JFrame and, for that matter, Frame. Remember, though, that JFrame is a subclass of Frame, and that Frame is a subclass of Window. Thus, JFrame publishes window events through the Window's interface, WindowListener.

Table 15-1. Common Graphics Events and Their Event Properties
Event Listener Interface Property
ActionEvent ActionListener actionPerformed
AdjustmentEvent AdjustmentListener adjustmentValueChanged
ComponentEvent ComponentListener componentHidden ...

Get Python Programming with the Java™ Class Libraries: A Tutorial for Building Web and Enterprise Applications with Jython 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.