Meaningless Drivel is fun!
The moose likes Swing / AWT / SWT and the fly likes Show a PopupMenu using a hotkey Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Show a PopupMenu using a hotkey" Watch "Show a PopupMenu using a hotkey" New topic

Show a PopupMenu using a hotkey

Mohit J Kumar
Ranch Hand

Joined: Apr 08, 2010
Posts: 33

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.

"It's good to B in touch...So keep responding"
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 44048
Can you add a KeyListener or similar to your table? The underlined text leads to some links which look helpful.
Darryl Burke

Joined: May 03, 2008
Posts: 4999

You can also use key bindings, which give you more flexibility than a KeyListener.
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.

luck, db
There are no new questions, but there may be new answers.
Have you checked out Aspose?
subject: Show a PopupMenu using a hotkey
It's not a secret anymore!