On Sep 1, 2:57 pm, anne001 <[EMAIL PROTECTED]> wrote:
> 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.
Absolutely not. 4.2 is a full example how an event is created and
fired.
4.1 masks the event creation, as it uses a built-in event, which
creates all the necessary parts for you (creating the event, creating
the source of event).
>
> 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...
Yes, there is as it is demonstrated.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---