Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / June 2004

Tip: Looking for answers? Try searching our database.

How can I fire an event ?

Thread view: 
Maurizio Ferreira - 21 Jun 2004 09:23 GMT
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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.