changeset 4394:cce5659427bb

7019963: The goto parent directory button doesn't operate in JFileChooser Reviewed-by: alexp
author rupashka
date Tue, 12 Jul 2011 11:41:50 +0400
parents 6bc0e1709d97
children 5c22624d193e
files src/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java
diffstat 1 files changed, 1 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java	Mon Jul 11 16:54:21 2011 -0700
+++ b/src/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java	Tue Jul 12 11:41:50 2011 +0400
@@ -810,10 +810,7 @@
             putValue(Action.ACTION_COMMAND_KEY, FilePane.ACTION_CHANGE_TO_PARENT_DIRECTORY);
         }
         public void actionPerformed(ActionEvent e) {
-            Component focusOwner = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner();
-            if (focusOwner == null || !(focusOwner instanceof javax.swing.text.JTextComponent)) {
-                getFileChooser().changeToParentDirectory();
-            }
+            getFileChooser().changeToParentDirectory();
         }
     }