I am an experienced Java programmer but new to Swing, so please bear with me.
I want to have a JPopupWindow that has keyboard focus. I want to answer the arrow keys, run (to close the menu) and Enter (to call the item). Should I add a KeyListener to the menu and encode it all myself, or is there some kind of βmodeβ that I can configure to activate this behavior, which seems to be standard.
In the standard section of the Swing manual, only mnemonics and accelerators speak JPopupMenus. I really don't want this.
It is hard to believe that it is completely against JPopupMenu grain.
What is the best way to get something like I want to implement?
source share