JDK-4760465 : JTable setDragEnabled first time activated fails
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.4.0
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2002-10-09
  • Updated: 2002-10-18
  • Resolved: 2002-10-18
Related Reports
Duplicate :  
Description

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

Comments
EVALUATION This is a duplicate of 4613903 which is fixed in mantis. ###@###.### 2002-10-18
18-10-2002