On Mon, 2005-12-19 at 22:40 -0500, Christopher Lansdown wrote: > Hi, > > JTextField doesn't seem to send any ActionEvent's when VK_ENTER is pressed, > and looking through the source it doesn't seem to try to catch this. >
Hi Chris, I ran a little test program and it seems to work for me. Are you trying to activate the ActionEvent programmatically, or were you actually typing the ENTER key into the text area? Are you using the newest Classpath? Here's a little test program to run, type in some text and hit enter. Every time you hit enter "hi" is printed to the console. Works for me. If this little program doesn't work for anyone, or if you can write a small program that shows what's wrong, please file a bug or email the list again. Test Program: import java.awt.event.*; import javax.swing.*; public class Test { public static void main(String[] args) { JFrame jf = new JFrame(); final JTextField text = new JTextField(10); text.addActionListener (new ActionListener() { public void actionPerformed(ActionEvent e) { System.out.println ("hi"); } } ); jf.add(text); jf.pack(); jf.setVisible(true); } } --Tony _______________________________________________ Classpath mailing list Classpath@gnu.org http://lists.gnu.org/mailman/listinfo/classpath