-
Enhancement
-
Resolution: Won't Fix
-
P5
-
1.4.0, 1.4.2
-
generic, x86
-
generic, windows_2000
Name: jl125535 Date: 05/11/2004
A DESCRIPTION OF THE REQUEST :
JList.setSelectedIndex(-1) should clear the selection
JUSTIFICATION :
On a JList, calling getSelectedIndex() when nothing is selected return -1.
However, calling setSelectedIndex(-1) does not unselect all element in the list.
This is inconsistent behaviour and should be corrected.
CUSTOMER SUBMITTED WORKAROUND :
In fact the normal way to unselect all element of a list is list.clearSelection();
(Incident Review ID: 237576)
======================================================================
A DESCRIPTION OF THE REQUEST :
JList.setSelectedIndex(-1) should clear the selection
JUSTIFICATION :
On a JList, calling getSelectedIndex() when nothing is selected return -1.
However, calling setSelectedIndex(-1) does not unselect all element in the list.
This is inconsistent behaviour and should be corrected.
CUSTOMER SUBMITTED WORKAROUND :
In fact the normal way to unselect all element of a list is list.clearSelection();
(Incident Review ID: 237576)
======================================================================
- relates to
-
JDK-4334792 Lead Index in DefaultListSelectionModel will never return to -1
-
- Closed
-