changeset 10305:48e1550d58a6

8066142: Edit the value in the text field and then press the tab key, the number don't increase Reviewed-by: serb, azvegint
author alexsch
date Wed, 03 Dec 2014 17:21:04 +0300
parents 905b48a93c2c
children 97a964e285ac 0fd9eb32e610
files src/share/classes/javax/swing/JComboBox.java
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/javax/swing/JComboBox.java	Mon Dec 01 21:02:21 2014 +0100
+++ b/src/share/classes/javax/swing/JComboBox.java	Wed Dec 03 17:21:04 2014 +0300
@@ -1308,8 +1308,8 @@
      */
     public void actionPerformed(ActionEvent e) {
         ComboBoxEditor editor = getEditor();
-        if ((editor != null) && (e != null)
-                && (editor.getEditorComponent() == e.getSource())) {
+        if ((editor != null) && (e != null) && (editor == e.getSource()
+                || editor.getEditorComponent() == e.getSource())) {
             setPopupVisible(false);
             getModel().setSelectedItem(editor.getItem());
             String oldCommand = getActionCommand();