whew, event handling is a little confusing. to clear it up i've tried
to map the Java 1.1 event model to the files in lab, ex4.2.  not sure
if its correct, and any comments would help.
*the event model was found in the recommended reading -
http://www.drbob42.com/JBuilder/jb210t.htm


Java 1.1 event model, steps 1-5:

MyEvent.java = 1. Create our own custom event class, named XXXEvent.

MyEventListenerImpl.java = 2. Create the XXXListener interface class,
containing methods that listener object need to overwrite.

MyEventListenerInterface.java = 2.Create the XXXListener interface
class, containing methods that listener object need to overwrite.

MyEventExample.java = 3. Add a property to the bean containing a list
of listener objects.

MyEventSource.java =  3. Add a property to the bean containing a list
of listener objects.
 4. Add an addXXXListener and removeXXXListener method, where XXX
stands for the name of the event.
 5. Add a method that will notify all registered listeners.

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en

Reply via email to