Java Event Handling Question and Answers
| 1. | What is an adapter class? |
|---|---|
|
|
| 2. | What interface is extended by AWT event listener? |
|---|---|
| All AWT event listeners extend the java.util.EventListener interface. | |
| 3. | What is an event and what are the models available for event handling? |
|---|---|
| An event is an event object that describes a state of change in a source.
In other words, event occurs when an action is generated, like pressing button, clicking mouse, selecting a list, etc. There are two types of models for handling events and they are
|
|
| 4. | What are the advantages of the model over the event inheritance model? |
|---|---|
The event delegation model has two advantages over the event inheritance model. They are
|
|