FULL PRODUCT VERSION :
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05)
Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
I can't get drag and drop of images to work correctly on windows. I see also that the drag and drop demo on the tutorial page doesn't work either.
http://java.sun.com/docs/books/tutorial/uiswing/misc/dnd.html
(grep for "Run DragPictureDemo")
My test case is trying to drag and drop an image into WordPad. What happens is, I get an image, of the correct size, but filled with a single color.
From http://access1.sun.com/tutorials/Swing_Tutorial/Dnd-Merlin-Tutorial/3.html and the drag and drop tutorial, I am lead to believe dragging from a java app to a native app should work.
I have posted a message about it a year ago. Unfortunately it simply generated comment asking me how I managed to get drag and drop working in the other direction: from an app to java.
http://forum.java.sun.com/thread.jspa?threadID=567809&messageID=3979708
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
An easy way of reproducing this is to go to
http://java.sun.com/docs/books/tutorial/uiswing/misc/dnd.html
and run the "DragPictureDemo". This is a link called "Run DragPictureDemo" which uses java web start.
Drag images from the window of cute children to word pad. Notice how you get little colored squares insteasd of pictures of cute children. It should be the picture I just dragged.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Drag images from the window of cute children to word pad. Notice how you get little colored squares insteasd of pictures of cute children. It should be the picture I just dragged.When images are dragged and dropped ot word pad i should get the image, not a big colored square. This is what happens on MacOS X (dragging onto to text edit).
ACTUAL -
Drag images from the window of cute children to word pad. Notice how you get little, picture sized colored squares instead of pictures of cute children.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
No error messages noticed.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
Code is on the web at;
http://java.sun.com/docs/books/tutorial/uiswing/misc/example-1dot4/index.html#DragPictureDemo
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
ummm.. use a mac? Not a good solution.
The bug could be reproduced by using copy/paste operations and standard Clipboard viewer clipbrd.exe
The "Picture" clipboard format is defective.