Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How can I fire an ActionEvent manually

843806Apr 3 2009 — edited Apr 4 2009
ActionEvent ae = new ActionEvent(jToggleButton1, ActionEvent.ACTION_PERFORMED, jToggleButton1.getActionCommand());

//jToggleButton1.dispatchEvent(ae);
Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(ae);
neither of these methods seems to do the trick, what am I missing here?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 2 2009
Added on Apr 3 2009
12 comments
658 views