Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

set F11 key as mnemonic for jButton

 
Carl John
Ranch Hand
Posts: 47
Eclipse IDE Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is possible to set F11 key as Jbutton mnemonic ...? If so ,Please guide me..!
 
Rob Spoor
Sheriff
Pie
Posts: 20552
57
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic