It seems that application expect the text of the textfield in the
ActionEvent when ENTER is pressed. I fixed this, which made the jIRCii
application somewhat work:
http://kennke.org/~roman/jircii.png
2006-03-31 Roman Kennke <[EMAIL PROTECTED]>
* javax/swing/JTextField.java
(fireActionPerformed): Put the textfields text in the action
instead of the action name.
/Roman
Index: javax/swing/JTextField.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/JTextField.java,v
retrieving revision 1.30
diff -u -1 -0 -r1.30 JTextField.java
--- javax/swing/JTextField.java 22 Feb 2006 10:03:14 -0000 1.30
+++ javax/swing/JTextField.java 31 Mar 2006 14:46:22 -0000
@@ -263,21 +263,21 @@
{
return (ActionListener[]) getListeners(ActionListener.class);
}
/**
* Sends an action event to all registered
* <code>ActionListener</code> objects.
*/
protected void fireActionPerformed()
{
- ActionEvent event = new ActionEvent(this, 0, notifyAction);
+ ActionEvent event = new ActionEvent(this, 0, getText());
ActionListener[] listeners = getActionListeners();
for (int index = 0; index < listeners.length; ++index)
listeners[index].actionPerformed(event);
}
/**
* Returns the number of columns of this text field.
*
* @return the number of columns