KeyListener
is low level and applies only to a single component. Despite attempts to make it more usable JFrame
creates a number of component components, the most obvious being the content pane. JComboBox
UI is also often implemented in a similar manner.
It's worth noting the mouse events work in a strange way slightly different to key events.
For details on what you should do, see my answer on Application wide keyboard shortcut - Java Swing.