W
William Zumwalt
A JWindow class is my main class (w/o all the title, min, max controls,
etc...) and I've implemented a KeyListener to it. I have a MouseListener
that works fine. But when I add a KeyListener, nothing happens when I
press the keys ... keyPressed(KeyEvent ke) catches nothing.
Inside the JWindow I have a JPanel which I set the focus to true (cause
I think you have to have focus on a component to get the key).
panel.setFocusable(true), but I still don't see any KeyPressed events
happening. Anyone have any ideas what's going on here.
Any help much appreciated.
Will
etc...) and I've implemented a KeyListener to it. I have a MouseListener
that works fine. But when I add a KeyListener, nothing happens when I
press the keys ... keyPressed(KeyEvent ke) catches nothing.
Inside the JWindow I have a JPanel which I set the focus to true (cause
I think you have to have focus on a component to get the key).
panel.setFocusable(true), but I still don't see any KeyPressed events
happening. Anyone have any ideas what's going on here.
Any help much appreciated.
Will