I\'m having problems with getting my KeyBoardFocusManger
to work with my full screen Window
. No matter what, it just wont get keyboard input. I use
As shown in this related FullScreenTest, you can use the same Action
instance for the button and the key binding.
Addendum: @nIcE cOw asks, Can we add more than one key on the same JComponent
by using InputMap
and ActionMap
, and use the same AbstractAction
class?
Yes, multiple key bindings are possible; I sometimes invoke doClick()
to get the audio-visual feedback, as shown here.