This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JTree collapses when reloaded (open problem)  RSS feed

 
S Dan
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!