Drag and Drop in Java - Painting more than just a border
Asked Answered
H

2

0

I have a JTable and a JList and I have my code set up so that I can drag from the JTable to the JList using built in Swing methods.

When I drag from the JTable to the JList, the "image" that is dragged is simply a border of the thing I am dragging. Specifically, in the case of the source being a JTable, the image is just a border of the row I selected to drag.

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

Housewife answered 11/7, 2012 at 2:51 Comment(0)
A
2

You may be able to take advantage of Drop Location Rendering to achieve the desired effect. If you are already doing so, please edit your question to include an sscce that exhibits any problems you encounter. This example may be helpful.

Avina answered 11/7, 2012 at 7:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.