wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes action performed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "action performed" Watch "action performed" New topic
Author

action performed

Ransika deSilva
Ranch Hand

Joined: Feb 18, 2003
Posts: 524
hey guys,
can u kindly tell me how to do this. say i want to perform an action like this. when i press the enter button from the keyboard it should activate my search button in the program. i know this is some thing to do with rootpane...
please let me know the setps
i have a jpanel which i have used to add the button.
thanks


SCJP 1.4, SCMAD 1.0<br />SCWCD, SCBCD (in progress)
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

Yeah... it's JRootPane.setDefaultButton( JButton )... you would just do something like this in your JPanel that has the button.



-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: action performed
 
Similar Threads
actionPerformed to close dialog
how to handle mutiple buttons
Struts, submit button with parameters
Not able to delete file using JButton in a frame
how can i map different Actionform class to single Action class