JDK-6409182 : REGRESSION: Unnecessary drawn column when shifting columns
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 6
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • CPU: x86
  • Submitted: 2006-04-05
  • Updated: 2010-04-02
  • Resolved: 2006-04-26
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6 b82Fixed
Related Reports
Relates :  
Description
FULL PRODUCT VERSION :
java version "1.6.0-beta2"
Java(TM) SE Runtime Environment (build 1.6.0-beta2-b76)
Java HotSpot(TM) Client VM (build 1.6.0-beta2-b76, mixed mode, sharing)

ADDITIONAL OS VERSION INFORMATION :
Linux linux 2.6.13-15.8-smp #1 SMP Tue Feb 7 11:07:24 UTC 2006 i686 i686 i386 GNU/Linux


A DESCRIPTION OF THE PROBLEM :
When rearranging (shifting) columns with mouse in JTable demo of SwingSet2, starting with mustang b76, there is one moment when a "ghost" picture of a dragged column is drawn about half an inch right (or left if one is moving the column to the left) from its real possition

REGRESSION.  1.5.0

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Open Table example of SwingSet2. Start dragging "First name" column slowly to the right, and the effect can be "freezed in time" just when you are about 3 pixels from "N" in "Last Name" column. If you are dragging fast enough, then just one unnecessary blink can be seen.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
If you drag the columns slow (pixel by pixel) enough, when they are just about to switch places, you will see the dragged column painted away from the cursor, with cursor being in the middle of switching columns, and a gray space between them.
ACTUAL -
Switching should work smoothly. It is actually a regression, it works OK in previous versions and mustang builds under b76

REPRODUCIBILITY :
This bug can be reproduced always.

Release Regression From : 5.0
The above release value was the last known release where this 
bug was known to work. Since then there has been a regression.

Comments
EVALUATION This was introduced by the fix for 6388189. A return statement appears to have been accidentally removed in mouseDragged inside BasicTableUI.java. For reference, here's the webrev that removed it: http://sa.sfbay.sun.com/projects/swing_data/mustang/6388189.2/ Replacing the return statement solves the problem.
11-04-2006