JDK-4835633 : JFileChooser: problem with clicking outside of a file being renamed
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.4.1,5.0
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic,windows_nt,windows_xp
  • CPU: generic,x86
  • Submitted: 2003-03-21
  • Updated: 2003-06-06
  • Resolved: 2003-06-06
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.
Other
5.0 tigerFixed
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Description
The following happens using 1.4.2, with the Windows L&F as well as Metal, on Win2k and XP.

When you have a JFileChooser up and are renaming the last item, clicking anywhere below the file being renamed should take you out of rename mode, and deselect the file (which is what happens w/ the native Windows file chooser).  Instead, in Details view nothing happens, and in List view the last items acts as if its icon has been clicked.  In both cases, you remain in file rename mode, and it's very disoncerting to be "stuck" renaming a file.

I believe that the underlying problem is that JFileChooser isn't correctly interpreting where mouse clicks in the file pane should go.  Some examples:

1) Select the first item in a List view.  Then click somewhere below that last item.  This should deselect the first item, but instead it selects the last item.

2) Select the first item in a Details view.  Then click somewhere below the last item.  This should deselect the first item, but instead nothing happens.


Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger FIXED IN: tiger INTEGRATED IN: tiger tiger-b09
14-06-2004

WORK AROUND
11-06-2004

SUGGESTED FIX
11-06-2004

PUBLIC COMMENTS
10-06-2004

EVALUATION This is pretty annoying. Will fix for tiger. ###@###.### 2003-04-17 What is happening is that BasicListUI.locationToIndex() is returning the last index in the file list, even if you click below the end of the list. locationToIndex() also returns an index if you click anywhere within a list's cell, even if the filename only takes up a small portion of that space. I took it upon myself to match all mouse file-selection behavior of the Windows L&F match the native Windows dialog. ###@###.### 2003-05-06
06-05-2003