How to add a keylistener to JPopupMenu?

58 views Asked by At

When using a JPopupMenu, pressing escape will result in closing the menu, is there a way disable this behaviour or overwrite it? adding a KeyListener to the menu doesn't work. I already got an item in the JPopupMenu that properly ends the dialog, but closing it by pressing escape will outright stop my program from working.

0

There are 0 answers