aspose file tools
The moose likes Swing / AWT / SWT and the fly likes How to update changes made in JTree to xml file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to update changes made in JTree to xml file" Watch "How to update changes made in JTree to xml file" New topic
Author

How to update changes made in JTree to xml file

Krithika Beri
Ranch Hand

Joined: Sep 11, 2012
Posts: 36
Hello,
I have a xml file which i am parsing using a dom parser and displaying as a JTree. Now I want that if any changes are made in the JTree, the changes should get updated to the xml. Please help
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19958
    
  25

Check out TreeModelListener. Note that all changes to any nodes must go through the model. That means, for example, that when you modify a DefaultMutableTreeNode that's part of a DefaultTreeModel, you call nodeChanged on that model afterwards.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
 
Have you tried LearnNowOnline? http://www.learnnowonline.com/
 
subject: How to update changes made in JTree to xml file