J
JTL.zheng
my code is:
JWindow window= new JWindow();
window.addKeyListener(new KeyListener() {
public void keyTyped(KeyEvent e) {
System.out.println((int) e.getKeyChar());
}
});
but it did not print any thing when I type the keyboard
(however, It can catch the mouse click event)
What should I do if I want to catch the KEY type event in JWindow?
Thank you very much.
JWindow window= new JWindow();
window.addKeyListener(new KeyListener() {
public void keyTyped(KeyEvent e) {
System.out.println((int) e.getKeyChar());
}
});
but it did not print any thing when I type the keyboard
(however, It can catch the mouse click event)
What should I do if I want to catch the KEY type event in JWindow?
Thank you very much.