More specific; I have made a class, extending a JPanel an displayed by the static method JOptionPane.showConfirmDialog(...) . I want my panel to catch a keypress like F1 to display help.
I tried to implement KeyListener => no reaction. I tried to add an action to the ActionMap of my panel and wrapped it to a KeyStroke in the Inputmap (something like: myPanel.getInputMap().put(aKeyStroke, aCommand); myPanel.getActionMap().put(aCommand, anAction);) => no reaction.
If I do the same with a textbox, everything goes fine, but it fails on something like a JSpinner or a JPanel.