File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes Drag N drop in JTree Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Drag N drop in JTree" Watch "Drag N drop in JTree" New topic

Drag N drop in JTree

Savvy Makol

Joined: Jun 03, 2003
Posts: 6
I have the problem of creating a JTree and then add he functionality of dragging a node and adding it to other node by dropping it on the other node.Its the same funtionality as we see in windows explorer also.Kindly help how to implement this.
Charles Hasegawa
Ranch Hand

Joined: May 22, 2003
Posts: 117
Here's a good place to start :
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24199

Here's one explicitly about DnD in JTrees; I learned how to do it from this article.

[Jess in Action][AskingGoodQuestions]
I agree. Here's the link:
subject: Drag N drop in JTree
It's not a secret anymore!