Explain how two components can be set up to share the same listener. How can the listener tell which component generated the event?
What will be an ideal response?
Two different components may generate the same type of event. For example, a push button and a text field both generate an action event. Therefore, the same listener object can be added to both components. When the event occurs, the component that generates the event calls the listener method. The getSource method of the event object returns a reference to the generating component.
You might also like to view...
Explain the difference between a compile-time error and a run-time error. Give an example of each.
What will be an ideal response?
What does encapsulate mean?
What will be an ideal response?
To add another bullet to a SmartArt graphic, click the Add Bullet button in the Create Graphic group.
Answer the following statement true (T) or false (F)
Private cloud
What will be an ideal response?