JDK-4218429 : JFileChooser shows multiple selections when they are not enabled.
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.2.0
  • Priority: P1
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris_2.5.1
  • CPU: sparc
  • Submitted: 1999-03-09
  • Updated: 1999-07-15
  • Resolved: 1999-07-15
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
1.3.0 betaFixed
Related Reports
Relates :  
Description
I'm using JDK 1.2 so I think that implies I'm also using Swing 1.2.

By default, JFileChooser is in single selection mode,
that is, I need to make a call to setMultiSelectionEnabled()
in order to enable selection of more than one file.  However, in
single selection mode, the file chooser highlights more than one
file.  I can either SHIFT-Click or CTRL-Click on a second file and more
than one will be highlighted.  This is very misleading to users as it
give the impression that more than one file has been selected and will,
therefore, be operated upon.

The one-line suggested fix will make the visuals agree with the implemented
semantics.

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: generic FIXED IN: kestrel-beta INTEGRATED IN: kestrel-beta
14-06-2004

EVALUATION Fixed in kestrel beta
11-06-2004

SUGGESTED FIX JFileChooser uses a JList as the guts of its display and, by default, the JList has a multiple selection model. The JList's selection model should be set to single selection. Add the following line in createList() of MetalFileChooserUI.java (and other corresponding files for the other L&Fs): list.setSelectionModel(ListSelectionModel.SINGLE_SELECTION);
11-06-2004