Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-5045434

JList.setSelectedIndex(-1) should clear the selection

XMLWordPrintable

    • 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)
      ======================================================================

            Unassigned Unassigned
            jleesunw Jon Lee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: