Hi all, I've added a key listener to a JPanel, but it wasn't working.
After an hour of changing settings, etc I figured out it was the JFrame
that was receiving the events - so I ended up having to add the key
listener to the JFrame and then have the JFrame invoke the keylistener
methods that I had created in my JPanel.
Is there a way to add a JPanel to a JFrame and then set the focus to
the JPanel so that the key listener in the JPanel works?
Thanks,
Novice
Vova Reznik - 16 Jun 2005 17:13 GMT
> Hi all, I've added a key listener to a JPanel, but it wasn't working.
> After an hour of changing settings, etc I figured out it was the JFrame
[quoted text clipped - 7 lines]
> Thanks,
> Novice
Read about Root Pane (You will need to understand Glass Pane)