This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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: 19655
    
  18

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
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to update changes made in JTree to xml file
 
Similar Threads
XML to DOM to JTree
Associating JTree to Document
JTree - Making it editable
Jtree DND - Database
JTree