JDK-7062705 : JFileChooser "level up" button does not work
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 7
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2011-07-05
  • Updated: 2012-03-20
  • Resolved: 2011-07-06
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
java 1.7 early access

ADDITIONAL OS VERSION INFORMATION :
Micosoft Windows XP Professional 2002 SP3

A DESCRIPTION OF THE PROBLEM :
I wrote an application in java, that has got a JFileChooser. If i want to open a file  the dialog opens. If I do not have the file in the default directory, I want to change it, but the "Up One Level" button does not work. On the other hand, I can navigate into subdirectories, and after that the button works. Only if I start with level up, it does nothing. It is quite disturbing.

I want to use Java 1.7, because I need some methods from the class BitSet, that are only available from 1.7. But i cannot, if the open file dialog does not work properly.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Open the FileDialog..
Press the "One Level Up" button.
-> nothing happens

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Navigate into the upper directory
ACTUAL -
Nothing happens, it stays in the actual directory, which is wrong.

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
JFileChooser chooser = new JFileChooser();
        FileNameExtensionFilter filter = new FileNameExtensionFilter(
                "XML files", "xml");
        chooser.setFileFilter(filter);
        chooser.setCurrentDirectory(new File("xml/"));
        int returnVal = chooser.showOpenDialog(this);
---------- END SOURCE ----------

Comments
EVALUATION I could not reproduce the problem on Windows Vista and Windows XP hosts with jdk 7 b142. I opend the dialog as is. It was not clear to me what directory structer should be.
06-07-2011