1

I would like to add drag and drop feature to my JTree. I have tried to run example from this thread. It works but it works only on last leaves in tree, not on nodes that contain some childs. I have also looked on this thread.

I have defined canImport and importData methods, and also have set setDragEnabled(true). I just cannot drag nodes also with its childs.

How to edit example from first link to drag also nodes with its childs? As I understand correctly, I should set DataFormat instance, to set what types should be dragged. Can anybody help?

Community
  • 1
  • 1
tomas.teicher
  • 913
  • 3
  • 13
  • 26

0 Answers0