Can anyone point me to either a universal class already designed or some training on developing Abstract Images of JPanels and it's subcomponents for use with either dnd or mousemove events? I'm a little stuck and just don't understand it at all.
When I start the dragging process I would like to make a copy of the component and it's subcomponents and create sortof a grayed out image of it while dragging. Not added to any layout and just free to be dragged between JPanels. Hense the reason I was talking about abstract images and what not. If this is not the correct terminology then I apologies for the confusion. Does this make more sense?
You can possibly explore this
1) Use BufferedImage to generate a "snapshot" of your component
2) Use this image with Toolkit#createCustomCursor(Image image, Point hotSpot, String name) 3) Essentially now you have your image as the cursor. When you move the cursor, the image moves with it. This should provide a proper drag feel to the user
4) On mouse release, revert back to the original cursor and swap child components as required.
Disclaimer: I have never done this myself. Others might have a more elegant solution