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 Problems with Drag and Drop Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Problems with Drag and Drop" Watch "Problems with Drag and Drop" New topic

Problems with Drag and Drop

Rudra Kumar

Joined: Feb 15, 2002
Posts: 4
Hi All,
I am writing an app where I am using Drag & Drop.
When I am dragging a tree node, the path is shown like this.
"Dragging from tree path = [Data, Geographic, US States]"
"Parent path = USA"
When I drop the tree node on some other node, this is happening.
"Removing the tree node"
"Dropping from tree path = [null, null, null]"
When I am drop the node, the node is removed from the original place.
But the Drop tree path is showing null. So, my tree node at the new
path is created as null DefaultMutableTreeNodes with no information in them.
Both the Drag & Drop tree path should have been the same for proper functioning of the program.
What can probably cause this problem?
Thanks in Advance,
I agree. Here's the link:
subject: Problems with Drag and Drop
It's not a secret anymore!