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

ListSelectionEvent has incorrect values for single-selection lists.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • None
    • 6
    • client-libs

      When a JList has a selection mode set to ListSelectionModel.SINGLE_SELECTION, the first and last index values of ListSelectionEvents show a range of selection values instead of the single selection index. The selection model returns the correct value for getMinSelectionIndex() and getMaxSelectionIndex(), however. If I understand the documentation, listSelectionEvent.getFirstIndex() should equal listSelectionModel.getMinSelectionIndex() and listSelectionEvent.getLastIndex() should equal listSelectionModel.getMaxSelectionIndex(), regardless of selection mode.

            shickeysunw Shannon Hickey (Inactive)
            tballsunw Tom Ball (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: