JDK-8013583 : Drag Image shows up with offset position
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 7,8
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: os_x
  • Submitted: 2013-04-04
  • Updated: 2014-11-17
  • Resolved: 2013-05-14
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 8
8Resolved
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
Java HotSpot(TM) 64-Bit Server VM
Currently used Java Runtime Environment
1.7.0_10-ea

Environment Settings:
OS
Mac OS X
OS Version
10.8.2
OS Architecture
x86_64
OS Language
en
Number of Processors
8
Physical Memory
8192
Assigned Memory
330MB (Max: 455MB
User
jensbaumgarten
User Home
/Users/jensbaumgarten
Application Class Version
50.0
Log File
/Users/jensbaumgarten/DigitalDesignerData/dd.log
Working Directory
/Workspace/Projekte4/dataplan/client/journaldesigner
Java Vendor
Oracle Corporation
Java Virtual Machine
Java HotSpot(TM) 64-Bit Server VM
Currently used Java Runtime Environment
1.7.0_10-ea
Java Class Version
51.0
Java Home
/Library/Java/JavaVirtualMachines/jdk1.7.0_10.jdk/Contents/Home/jre
Java Class Path
/Workspace/Projekte4/bin:/Workspace/Projekte4/dataplan/lib/dpclientlibs.jar:/Workspace/Projekte4/dataplan/lib/dpserverlibs.jar: /Workspace/Projekte4/dataplan/lib/dpswingxlibs.jar:/Workspace/Projekte4/dataplan/lib/jdbc/sqljdbc.jar: /Workspace/Projekte4/dataplan/lib/sap/sapjco.jar:/Workspace/Projekte4/dataplan/lib/sap/sapjco3.jar: /Workspace/Projekte4/dataplan/lib/adobe/InDesignServerAPI_CS5.jar:/Workspace/Projekte4/dataplan/lib/dpqps92libs.jar:
Timezone
Europe/Berlin
Country
US
File Encoding
UTF-8
Default Charset
UTF-8
Charset in use
UTF8
 

ADDITIONAL OS VERSION INFORMATION :
MacOSX 10.8.2

A DESCRIPTION OF THE PROBLEM :
When we start a D&D operation, we use a Drag Image to show the dragged object. The location where this image is shown on screen, is the top left mouse point with java 6. With java 7 it is moved somewhere. An also the mouse drag point is moved.

REGRESSION.  Last worked in version 6u31

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Just create a drag listener and use the startDrag with an image:

public void dragGestureRecognized(DragGestureEvent dge) {
BufferedImage _image = new BufferedImage(100, 100, BufferedImage.TYPE_INT_ARGB);
Graphics2D g2d = _image.createGraphics();
g2d.setColor(Color.red);
g2d.fillRect(0,0,100,100);
dge.startDrag(DragSource.DefaultMoveDrop,_image, new Point(0, 0),new StringSelection( " test " ), this);



REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
Just create a drag listener and use the startDrag with an image:

public void dragGestureRecognized(DragGestureEvent dge) {
BufferedImage _image = new BufferedImage(100, 100, BufferedImage.TYPE_INT_ARGB);
Graphics2D g2d = _image.createGraphics();
g2d.setColor(Color.red);
g2d.fillRect(0,0,100,100);
dge.startDrag(DragSource.DefaultMoveDrop,_image, new Point(0, 0),new StringSelection( " test " ), this);

---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
Use startDrag without Drag Image.
Comments
THe problem is already fixed in 8 by JDK-8005405. The fix will be backported to 7 soon.
14-05-2013