i want to add drag and drop support to my JTree application
i hav a created a custom DefaultMutableTreeNode subclass
hav a default TreeCellRenderer
w
The easiest way is to
1. Call tree.setDragEnabled(true)
2. set tree.transferHandler
There's a tutorial at: http://java.sun.com/docs/books/tutorial/uiswing/dnd/intro.html
You create a subclass of TransferHandler where you implement
canImport(JComponent comp, DataFlavor[] transferFlavors)
and
importData(JComponent comp, Transferable t)
I found this also useful
https://blogs.oracle.com/CoreJavaTechTips/entry/adding_drop_support_to_jtree