I have created a JTree which has methods allowing to add,delete or modify nodes.Basically ,the JTree tags are read from an XML file and then shown.Now,I want the modified JTree nodes to be saved to the XML file.Is there any way,I can create an XML file from the JTree? I would be happy if someone could reply. Thanks in advance.CHEERS.
posted 13 years ago
Your problem arise because you're mixing data and gui. Best way to do these data manipulations is to use Java best practice MVC scheme. It means Model-View-Controller. Data (model) are strickly separated from gui (view), everything controled from one class (controller). MVC