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

ListSelectionEvent has incorrect values for single-selection lists.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Not an Issue
    • Affects Version/s: 6
    • Fix Version/s: None
    • Component/s: client-libs
    • Labels:

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: