Saving swing to a file
I have a program whose output is a JTree. I want to be able to save that tree in a file for later viewing. I dont mind if this is done by saving it as a Jpeg or if it saves the data and rewrites the JTree each time it is loaded. The JPEG is the prefered option.
Any ideas how to do this?
Bow_wow.
[322 byte] By [
bow_wow] at [2007-9-26 18:25:42]

> I have a program whose output is a JTree. I want to be
> able to save that tree in a file for later viewing. I
> dont mind if this is done by saving it as a Jpeg or if
> it saves the data and rewrites the JTree each time it
> is loaded. The JPEG is the prefered option.
>
> Any ideas how to do this?
>
> Bow_wow.
How about saving the tree as an xml file. The xml file can be view with internet explorer. you can start by writing a class that extends org.jdom.output.XMLOutputter
Try researhing JDom
Hope that helps