This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes jtree structure update Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "jtree structure update" Watch "jtree structure update" New topic
Author

jtree structure update

kizgincocuk kizgincocuk
Greenhorn

Joined: Sep 15, 2003
Posts: 9
hi..
i wanna to update my tree structure after a specific action.I am adding/deleting nodes,but i can't see changes..
thanx..
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 9136
    
    9

If you are using or extending javax.swing.tree.DefaultTreeModel, invoke fireTreeNodesInserted() on it. That will tell the model that the data has changed and it will fire events off to inform interested parties (i.e. the display). Look at the documentation for other useful event-firing methods.


[How To Ask Questions On JavaRanch]
kizgincocuk kizgincocuk
Greenhorn

Joined: Sep 15, 2003
Posts: 9
thanx ... joe
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: jtree structure update
 
It's not a secret anymore!