Java Reference
In-Depth Information
Summary
Java GUI programming uses the Delegation Model for handling the
events of components and containers. The source of an event invokes a
method on a registered listener of the event, with the two objects com-
municating via a common interface.
■■
An event consists of an event class that extends java.util.EventObject
and an interface that extends the java.util.EventListener interface.
■■
You can determine which events a component generates by viewing the
add<event_name>Listener() methods of the component's class.
■■
This chapter discussed the commonly used Swing and AWT compo-
nents, focusing on how to construct them and what types of events they
generate.
■■
Search WWH ::




Custom Search