• Post Reply Bookmark Topic Watch Topic
  • New Topic

Open Menu on pressig ALT-key  RSS feed

 
Theo van Loon
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,
i know how to activate a menuitem by by using setAccelerator e.g.
exitItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X, InputEvent.ALT_DOWN_MASK));
But how can i activate the entire menu just by pressing alt?
Thanks!!
 
A. Wolf
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
listen for keyCode 18 via keyListener? can you set the menu bar expanded or selected?
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can set the mnemonic for the menu to the ALT key...

 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!