File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Show a PopupMenu using a hotkey

 
Mohit J Kumar
Ranch Hand
Posts: 33
Eclipse IDE Firefox Browser Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
Is it possible to show a popup menu using a hotkey like "Alt Shift a"?
I have a table on which I am able to display a popup menu on right click.
I want to do it using some hotkey.
 
Campbell Ritchie
Sheriff
Pie
Posts: 47261
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you add a KeyListener or similar to your table? The underlined text leads to some links which look helpful.
 
Darryl Burke
Bartender
Posts: 5115
11
Java Netbeans IDE Opera
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can also use key bindings, which give you more flexibility than a KeyListener.
From http://download.oracle.com/javase/tutorial/uiswing/misc/keybinding.html
JComponent.WHEN_IN_FOCUSED_WINDOW
The component's window either has the focus or contains the component that has the focus. This input map is commonly used for mnemonics or accelerators, which need to be active regardless of where focus is in the window.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic