Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-7062705

JFileChooser "level up" button does not work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2 P2
    • None
    • 7
    • client-libs

      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 ----------

            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: