I figured out what I did not understand.
4.1 uses an actual Java event, clicking on a button fires the chain of
events.
4.2 is a simulation, as if, there is no even fired, only a method
called manually.

What confused me was

public class MyEvent extends EventObject {

    /** Creates a new instance of MyEvent */
    public MyEvent(Object source) {
        super(source);
    }
which made it sounds as if there was a way of creating real event
objects...

But I checked and
public class MyOwnEvent{

public MyOwnEvent(Object source) {
}

works just the same. So example 4.2 has nothing to do with events API,
it is just a program using classes to show a simulation of what goes
on with events.

--~--~---------~--~----~------------~-------~--~----~
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