aspose file tools*
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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
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: 47

It is possible to set F11 key as Jbutton mnemonic ...? If so ,Please guide me..!


CJohn
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19784
    
  20

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 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: set F11 key as mnemonic for jButton