changeset 4545:72b2b2a3f228

7019963: The goto parent directory button doesn't operate in JFileChooser Reviewed-by: alexp
author rupashka
date Wed, 10 Aug 2011 18:51:06 +0400
parents e01325b53a12
children 22f8570179e7
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	Wed Aug 10 18:47:31 2011 +0400
+++ b/src/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java	Wed Aug 10 18:51:06 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();
         }
     }