Code:
DefaultMutableTreeNode dmtn = new DefaultMutableTreeNode("root");
DefaultMutableTreeNode child = new DefaultMutableTreeNode("leaf1");
dmtn.add(child);
child = new DefaultMutableTreeNode("leaf2");
dmtn.add(child);
child = new DefaultMutableTreeNode("leaf3");
dmtn.add(child);
mymodel = new DefaultTreeModel(dmtn);
mytree = new JTree(mymodel);
How to realize drag'n'drop for tree leafs?
Please, write code, if it is not difficult for you.