JDK-6554432 : JFileChooser setCurrentDirectory destroys details view
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 6
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2007-05-07
  • Updated: 2011-02-16
  • Resolved: 2007-07-13
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
java version "1.6.0_01"
Java(TM) SE Runtime Environment (build 1.6.0_01-b06)
Java HotSpot(TM) Client VM (build 1.6.0_01-b06, mixed mode, sharing)

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]

A DESCRIPTION OF THE PROBLEM :
When creaing a JFileChooser and setting its current directory via the JFileChooser.setCurrentDirectory() method, details view of the file system is corrupted. This works in both the Windows L&F and the cross-platform L&F. The heading for the "Type" column vanishes and is replaced by the "Date Modified" column; the "Type" values for each file are placed in the "Date Modified" column.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Before instantiating a JFileChooser, set its current directory via the setCurrentDirectory() method to something like C:\. After instantiating, click on the details button in the File Chooser UI. Observe the columns aren't properly matched up.


REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
JFileChooser fc = new JFileChooser();
fc.setCurrentDirectory(new File("C:\\"));
fc.showOpenDialog(null);
---------- END SOURCE ----------

Release Regression From : 5.0u11
The above release value was the last known release where this 
bug was not reproducible. Since then there has been a regression.