Steps to reproduce: 1. Compile and run the attached testcase. 2. Type something to the textarea. Expected results: 1. Strings "KeyTyped" and "KeyPressed" are printed to stdout when you type something to the textarea. Actual results: 1. Nothing is printed to stdout. Testcase: import java.awt.*; import java.awt.event.*; import javax.swing.*; public class keyhandler extends JFrame { public static void main(String[] args) { (new keyhandler()).show(); } public keyhandler() { JTextArea a = new JTextArea(80, 25); a.addKeyListener(new KeyHandler()); this.setContentPane(a); this.setSize(new Dimension(400, 400)); } private class KeyHandler implements KeyListener { public void keyTyped(KeyEvent e) { System.out.println("keyTyped"); } public void keyPressed(KeyEvent e) {System.out.println("keyPressed"); } public void keyReleased(KeyEvent e) { } } }
I checked in a fix for that. Please test and close the bug if it works.
Nice, seems to work now. (I probably don't have permissions to close the bug since I can't see such an option on this web page even if I am logged in).