File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "jtree structure update" Watch "jtree structure update" New topic

jtree structure update

kizgincocuk kizgincocuk

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

Joined: Oct 29, 2001
Posts: 8834

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.

"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
kizgincocuk kizgincocuk

Joined: Sep 15, 2003
Posts: 9
thanx ... joe
jQuery in Action, 2nd edition
subject: jtree structure update
Similar Threads
addBatch - help/ideas?
hibernate + An exception occurred: org.hibernate.type.SerializationException
Replacing existing files with updated ones
what java classes get loaded and used in WAS