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

JTable setDragEnabled first time activated fails

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 1.4.0
    • client-libs



      Name: sv35042 Date: 10/09/2002


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

      FULL OPERATING SYSTEM VERSION :
      Microsoft Windows 2000 [version 5.00.2195]
      Service pack 2
      ADDITIONAL OPERATING SYSTEMS :




      A DESCRIPTION OF THE PROBLEM :
      Then you use setDragEnabled on a JTable, you assume that you
      will drag the elements right away. You select first the rows
      you want to drag and then move the mouse and it should go
      over in drag mode. This happens then do it after the first
      time, but the first time and you move the mouse down or up
      it will deselect or select more rows until after a few rows
      (depending on how fast you move the mouse) it will go over
      in drag mode.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. Select a row in the Table
      2. Move the mouse down while pressing left to drag
      3. after a while it will go over in drag
      4. if you select a row again
      5. Move the mouse down again it will go in drag at once

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      I expect the results that occur second time you drag.


      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import javax.swing.JFrame;
      import javax.swing.JScrollPane;
      import javax.swing.JTable;

      public class TableTest {
          public static void main(String[] args) {
              JFrame frame = new JFrame("Test of Table");
              JTable table = new JTable(10,10);
              table.setDragEnabled(true);
              frame.getContentPane().add(new JScrollPane(table));
              frame.pack();
              frame.setVisible(true);
              frame.setDefaultCloseOperation(frame.EXIT_ON_CLOSE);
          }
      }

      ---------- END SOURCE ----------
      (Review ID: 145812)
      ======================================================================

            shickeysunw Shannon Hickey (Inactive)
            svioletsunw Scott Violet (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: