JDK-6384033 : JFileChooser sorting on Size column is incorrect
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 6
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_2000,windows_xp
  • CPU: x86
  • Submitted: 2006-02-10
  • Updated: 2011-02-16
  • Resolved: 2007-05-02
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7Resolved
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
java version "1.6.0-rc"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-rc-b69)
Java HotSpot(TM) Client VM (build 1.6.0-rc-b69, mixed mode, sharing)

A DESCRIPTION OF THE PROBLEM :
When viewing files in the JFileChooser sorting on columns is now possible by clicking on a column heading. (see bug 4752713) However clicking on the Size column results in file sizes being sorted alphabetically rather than numerically, which is not in the least bit useful.

See http://www.slac.stanford.edu/~tonyj/swing/JFileChooser.png

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Open a JFileChooser, selected detailed view, sort on Size column.


REPRODUCIBILITY :
This bug can be reproduced always.
The code reproducing the issue, is:

JFileChooser fc = new JFileChooser(new File("C:\\"));
fc.showOpenDialog(null);

Comments
EVALUATION Looks like another side of 6515169, caused by mixing up instances of java.io.File and sun.awt.shell.Win32ShellFolder2 as current directory.
26-04-2007

EVALUATION Cannot reproduce so far, requested environment details from the bug initiator.
17-02-2006