This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
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

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
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