Event Handling
  What is the highest-level event class of the event-delegation model?
Ans : The java.util.eventObject class is the highest-level class in the event-delegation hierarchy.


What interface is extended by AWT event listeners?
Ans : All AWT event listeners extend the java.util.EventListener interface.


What class is the top of the AWT event hierarchy?
Ans : The java.awt.AWTEvent class is the highest-level class in the AWT event class hierarchy.

What event results from the clicking of a button?
Ans : The ActionEvent event is generated as the result of the clicking of a button.

What is the relationship between an event-listener interface and an event-adapter class?
Ans : An event-listener interface defines the methods that must be implemented by an event handler for a particular kind of event. An event adapter provides a default implementation of an event-listener interface.

In which package are most of the AWT events that support the event-delegation model defined?
Ans : Most of the AWT–related events of the event-delegation model are defined in the java.awt.event package. The AWTEvent class is defined in the java.awt package.


What is the advantage of the event-delegation model over the earlier event-inheritance model?
Ans : The event-delegation has two advantages over the event-inheritance model. It enables event handling by objects other than the ones that generate the events. This allows a clean separation between a component’s design and its use.
(c) Shilpa Sayura Foundation 2006-2017