summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTania Bento <tbento@redhat.com>2006-10-31 20:41:10 +0000
committerTania Bento <tbento@redhat.com>2006-10-31 20:41:10 +0000
commit94e9093cc589045b798242ba51f7507555842b49 (patch)
tree820c453f19505242d749027fb400af1f50b852de
parent94c0058c0df2e7a559f7b3224a442c6596e1b44e (diff)
downloadclasspath-94e9093cc589045b798242ba51f7507555842b49.tar.gz
2006-10-31 Tania Bento <tbento@redhat.com>
* javax/swing/JTextField.java (fireActionPerformed): When creating the new event, if actionCommand == null, then getText() is used.
-rw-r--r--ChangeLog6
-rw-r--r--javax/swing/JTextField.java3
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 9df31afc6..2dfa45d37 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-10-31 Tania Bento <tbento@redhat.com>
+
+ * javax/swing/JTextField.java
+ (fireActionPerformed): When creating the new event, if
+ actionCommand == null, then getText() is used.
+
2006-10-31 Francis Kung <fkung@redhat.com>
* gnu/java/awt/peer/gtk/CairoGraphics2D.java
diff --git a/javax/swing/JTextField.java b/javax/swing/JTextField.java
index 1212582b7..ace358f89 100644
--- a/javax/swing/JTextField.java
+++ b/javax/swing/JTextField.java
@@ -270,7 +270,8 @@ public class JTextField extends JTextComponent
*/
protected void fireActionPerformed()
{
- ActionEvent event = new ActionEvent(this, 0, actionCommand);
+ ActionEvent event = new ActionEvent(this, 0,
+ actionCommand == null ? getText() : actionCommand);
ActionListener[] listeners = getActionListeners();
for (int index = 0; index < listeners.length; ++index)