File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes event generation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "event generation" Watch "event generation" New topic
Author

event generation

Rajeev Ravindran
Ranch Hand

Joined: Aug 27, 2002
Posts: 455
hi all,
can we progammatically invoke the event of a button ?? i mean, without implementing the ActionListner interface is it possible to invoke the event of a button using jdk1.2 or higher ??
thanks
raj.


SCJP, SCWCD, SCBCD, Oracle Certified Professional (SQL n PL/SQL)
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
you can use this from api:
fireActionPerformed protected void fireActionPerformed(ActionEvent event)

Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method.

but you need to implement your listener !!!
[ June 30, 2003: Message edited by: Benjamin Leonard ]
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
Another option might be to move the ActionPerformed task into a separate function. The function is then able to be called from elsewhere in the code.
instead of this

something like this
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: event generation
 
Similar Threads
How to identify when refresh button of browser or f5 is pressed
Two submit buttons in a form?
validating textfield with +ve/-ve values using 2 radiobuttons
Firing a Java Code on a scheduled time
How to call a javascript function on back button press of the brower window