I’m trying to create an ghost image while performing an awt.dnd operation from a canvas 2D which is in a panel on top of the program into a canvas 3D which is also in a panel in the middle of the program. The D-n-D stuff is implemented and working, with setDragImage(). I can easily get my ghost image, but I need to get it working for Java 1.6, where this method is missing.
Now I tried a lot with glass panels etc :
- Glass panel is working except over the Canvas3D (heavyweight component)
- If I use a AWT glass panel (Frame) it paints my ghost image but the whole program black
GHOST drag and drop, over multiple windows:
saw this interesting link to create a JDialog, also created it but I don’t know how to get my dialog non opaque: WindowsUtils.setOpaque(d, false); is no class I have and I can’t find it. It is necessary because Ii need this 1 pixel space on my cursor to get focus on my canvas3d. I hope anyone has any suggestions I cant find anything useful for my problem on Google anymore, thanks
You’re in for a lot of work. I’m not farmiluar with
canvas3dorcanvas2d, but as you say, they seem to heavy weight components, these tend not to support transparency.Per-Pixel Alphering was introduced into Java 6.10 as a private API and has begin made public with Java 7.
You can access the private APIs, but it is not recommended, the next question you need to ask, is what to do when the API’s don’t exist?!