问题
How can I implement drag and drop on custom components, e.g. my own JPanel
subclasses?
What I need is full Swing-like drag and drop support. With TransferHandlers
, DropTargetListeners
etc. So the trivial mousePressed()
and mouseReleased()
is not what I'm looking for.
回答1:
Perhaps Lesson: Drag and Drop and Data Transfer.
来源:https://stackoverflow.com/questions/2990634/how-to-drag-and-drop-on-custom-swing-components