We help IT Professionals succeed at work.

keyListener for popupMenu

semion50
semion50 asked
on
Hello,
Does anyone know if it is possible to add the key Listener for popupMenu (CNTRL and ALT+SHIFT+F12);
I can't use the JPopupMenu only for JDK 1.2
Thanks!
Comment
Watch Question

Commented:
Normally you add the listener on the component which uses the popup menu. If you have a Frame you should listen on that Frame for "F1" key for example and call popup.setVisible(true), or popup.show().
Ovi

Commented:
use yourPopupMenu.show(Component yourMainComponent, int xLocation, yLocation);

Commented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

- Points for Ovi

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Venabili
EE Cleanup Volunteer

Explore More ContentExplore courses, solutions, and other research materials related to this topic.