The Artima Developer Community
Sponsored Link

Java Answers Forum
Urgent: JTree distored on adding the nodes by thread

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Seetha Raman

Posts: 1
Nickname: karthick
Registered: May, 2003

Urgent: JTree distored on adding the nodes by thread Posted: May 26, 2003 3:07 AM
Reply to this message Reply
Advertisement
Hi all,

I have a JTree with more number of nodes. The Jtree is having Drag and drop functionality.

Suppose there exists a structure as follows:

A
A.B
A.B.C
A.D

where A is the root node. B is a folder node and C and D are leaf nodes.

List this the Tree has lots of nodes in it.

When I drag and drop 'C' to 'A', which is being threaded, the JTree gets distorted at the time of dropping. And after the drop completes, the JTree gets the original structure.

This distortion doesn't take place if the dropping is not threaded.

Here is the code snippet which is called when node structure is changed.

public void nodeStructureChanged(TreeNode node) {
try {
((SDLTreeNode) node).reload();
}
catch(RemoteException e) {
throw new RuntimeException("Error occured reloading node " + node + ": " + e.getMessage());
}
super.nodeStructureChanged(node);
}

Any sugessions or help in this regard is more welcome

Regards,
S. Seetha Raman

Topic: JUnit and Hello World Previous Topic   Next Topic Topic: Need to make JFrame Always on top.

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use