aspose file tools
The moose likes Swing / AWT / SWT and the fly likes JTree collapses when reloaded (open problem) Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply Bookmark "JTree collapses when reloaded (open problem)" Watch "JTree collapses when reloaded (open problem)" New topic
Author

JTree collapses when reloaded (open problem)

S Dan
Greenhorn

Joined: Apr 05, 2005
Posts: 25
I'm trying to reload a part of the jtree, where the node value has been changed (suppose the tree represents directory structure and the some file name has been modified under the root directory). The problem is that, each time I reload it, the tree collapses. I have an utility function to expand the tree but the problem is that the tree nodes changes (basically file names)quite frequently (every sec) and expanding the whole tree after each reload causing horrible flickering.
I tried reload(node), fireTreeStructureChanged(Object source, Object[] path, int[] childIndices, Object[] children) , reload and all sort of relevant methods. But nothing works!! Can anyone tell me how to refresh a node of a tree without collapsing the whole tree.
From my google search, it seems that it is an open problem! I'd appreciate if you could provide me an working example.. As for example a FileTree where a file name change on your local machine will be reflected in that tree dynamically, without collapsing the tree.
Thanks.
-Dan
[ January 17, 2006: Message edited by: S Dan ]
KiranKiran Chandra
Greenhorn

Joined: Mar 15, 2006
Posts: 1
I am having the same problem, with respect to implementing a tree table. Did you get any leads for your question. Any help in this regards would be greatly appreciated.

Thanks,

Kiran
Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JTree collapses when reloaded (open problem)
 
Similar Threads
Jtree Help
JTree reload question, AGAIN
JTree
Searching a JTree
JTree - Compare Nodes problem