It's not a secret anymore!
The moose likes Swing / AWT / SWT and the fly likes set F11 key as mnemonic for jButton Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply Bookmark "set F11 key as mnemonic for jButton" Watch "set F11 key as mnemonic for jButton" New topic
Author

set F11 key as mnemonic for jButton

Carl John
Ranch Hand

Joined: Jun 14, 2010
Posts: 34
It is possible to set F11 key as Jbutton mnemonic ...? If so ,Please guide me..!
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19216

As a mnemonic, no. Mnemonics are keys that will be activated when you press Alt. For instance, 'X' would be the mnemonic if Alt+X would activate the button.

What you want is what is an accelerator in menu items. This doesn't exist for other* buttons, but you can use key bindings instead. Check out the Java tutorial for more information.


* JMenuItem extends AbstractButton so technically it's a button


SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: set F11 key as mnemonic for jButton
 
Similar Threads
Mnemonic question
JMenu
Underline first character of a JButton?
Hot keys!
shortcut key for label