Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to Refresh JTree if a file System got changed during Run-time

843805Oct 17 2005 — edited Oct 18 2005
Hi,
Can anyone tell me how to refresh a JTree(javax.swing.JTree) used for displaying file system(both local and remote).

I'm getting a problem if a file/directoy is added to the file system, after my Applet is loaded. Actually, i have used DefaultTreeModel's reload() method for refreshing and calling it inside SwingUtilities.invokeLater() using Thread, but its not working.
I want that the tree should reflect the latest Files/Directories on the click of a node, if any file or directory is added under that node.
Plz tell me if this is possible or not.
Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 15 2005
Added on Oct 17 2005
4 comments
390 views