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

JList selection changes when clicking empty area below (outside) last item

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • None
    • 1.4.2
    • client-libs
    • x86
    • linux, windows_2000



      Name: rmT116609 Date: 10/20/2003


      FULL PRODUCT VERSION :
      java version "1.4.2_01"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06)
      Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode)

      A DESCRIPTION OF THE PROBLEM :
      In the Metal L&F, when clicking below / past the last item in a JList, the last item is selected. I think under almost all circumstances, this is not what the user intended to do. The selection should either be cleared or left unchanged when this happens.


      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      package net.kano.spinnyflash;

      import javax.swing.JFrame;
      import javax.swing.JList;
      import java.awt.Container;

      public class ListSelectionTester {
          public static void main(String[] args) {
              JFrame frame = new JFrame("List Selection Tester");

              Container pane = frame.getContentPane();

              pane.add(new JList(new Object[] { "Hey", "Hi", "Item 3", "Item 4", "Blah", "Click below this" }));

              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              frame.setSize(200, 500);
              frame.setVisible(true);
          }
      }

      ---------- END SOURCE ----------
      (Incident Review ID: 216783)
      ======================================================================

            pbansal Pankaj Bansal (Inactive)
            rmandalasunw Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: