aspose file tools
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 Barcodes with iOS this week in the iOS forum
or Core Java for the Impatient in the Java 8 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: 40952
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: 4744

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.
I agree. Here's the link:
subject: Show a PopupMenu using a hotkey