Drag and Drop in Java - Painting is more than just a border

I have JTable and JList, and I have my code that can be dragged from JTable to JList using the built-in Swing methods.

When I drag from JTable to JList, the “image” that is being dragged is simply the border of the thing I am dragging. In particular, in the case where the source is JTable, the image is only the border of the line that I selected to drag and drop.

How can I redefine what this "image" is? How can I get it so that the user can drag the text, not just the border (rectangle)?

0
source share

All Articles