diff options
author | Tania Bento <tbento@redhat.com> | 2006-10-31 20:41:10 +0000 |
---|---|---|
committer | Tania Bento <tbento@redhat.com> | 2006-10-31 20:41:10 +0000 |
commit | 94e9093cc589045b798242ba51f7507555842b49 (patch) | |
tree | 820c453f19505242d749027fb400af1f50b852de | |
parent | 94c0058c0df2e7a559f7b3224a442c6596e1b44e (diff) | |
download | classpath-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-- | ChangeLog | 6 | ||||
-rw-r--r-- | javax/swing/JTextField.java | 3 |
2 files changed, 8 insertions, 1 deletions
@@ -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) |