Class 1, Part 2 |
Intro to Java 30-IT-396 |
|
Multicasting
-
Since our listener classes are objects, we can have one listener object
and add it to multiple components.
-
Example: a Close button and the 'X' icon on the frame might share the same
window closing listener.
-
We can also register multiple listeners on the same component.
-
We might have certain buttons or text fields on a data form that automatically
save the contents of that form to a database when an event occurs.
These buttons might have their own listener to perform validation or other
actions, and share a save listener that saves the state of the form.
-
Having multiple listeners is called Mulitcasting.
Adapter Classes



Created by: Brandan
Jones January 4, 2002