Hi all, I have an
Applet that displays a familty tree. Another application is used to generate the family tree as a series of panels in a grid format. The Applet reads the serialized JPanels and displays them. I use serializartion of the panels instead of the underlying data because placing the Person objects on the panel is a recursive function that may take a while based on family size, so to save time, I seriealized the final product, after all panels are created and placed...
Anyway, the problem is that JComponents that are serialized are not compatible with other versions of the
Java Run Time, so if I use JRE_1.4.2 to make the family tree to begin with, only 1.4.2 viewers will work. This means that those with 1.4.1_02, or 1.4.2_01, or whatever the next version of Java will be will not be able to view the Serialized panel...
I tried to use XMLEncoder, which the Java API says is supposed to be used for long term storage, but it seems to only work for JavaBeans.. and I don't think my sub-classed panels are Beans, 'cause I get an InstantiationException whenever I call the XMLEncoder's writeObject method on my top-level panel...
Is there some way I can Serialize JPanels and make them useable from one version to the next? If not, how can I use the XMLEncoder? It seems that I have to have special Developement Kits to make beans, is that true?
Thanks for any help...