How to drag-and-drop on custom Swing components

北城余情 提交于 2019-12-23 03:18:30

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!