Th tutorial is full of places where it teach you how to trap an event,
but how can I fire an event ?
For example, when clicking on a button I'd like to fire a CloseWindow
event, in such a way that the associated listener is subsequently
invoked, and then it can decide if the window must be closed
(disposed) or not.
Regards
Maurizio
Thomas Weidenfeller - 21 Jun 2004 10:22 GMT
> Th tutorial is full of places where it teach you how to trap an event,
> but how can I fire an event ?
Event handlers are just methods. All you have to do is to construct the
necessary arguments (e.g. an Event object), and call the method from the
EDT.
However, there is usually no need to call event methods yourself. If
multiple events should result in the same thing, you provide them with
the same event handler (you register the very same event listener object
as listener for both, or the very same Action object).
/Thomas
Roedy Green - 21 Jun 2004 17:37 GMT
>Th tutorial is full of places where it teach you how to trap an event,
>but how can I fire an event ?
see http://mindprod.com/jgloss/event11.html#SYNTHETICEVENTS

Signature
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
Maurizio Ferreira - 22 Jun 2004 13:26 GMT
>http://mindprod.com/jgloss/event11.html#SYNTHETICEVENTS
Thank you very much
Wwhat's strange is that there isn't (AFAIK ) a frame method to cause a
close event to be generated and sent to the frame itself,
something like self.close();
Maurizio
Roedy Green - 22 Jun 2004 21:34 GMT
>Wwhat's strange is that there isn't (AFAIK ) a frame method to cause a
>close event to be generated and sent to the frame itself,
>something like self.close();
See http://mindprod.com/jgloss/close.html

Signature
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
Maurizio Ferreira - 23 Jun 2004 09:35 GMT
>http://mindprod.com/jgloss/close.html
Thank you very much. It is very clear.
Maurizio