how to copy JPanel to another JPanel
843810Oct 25 2005 — edited Oct 27 2005I have a JPanel called dataPanel.
I serialize it, then I modify dataPanel, and at some point I want to revert to the serialized panel.
I'm trying to do this in the following way:
JPanel aaa = deserialize();
dataPanel = aaa;
This does not work. However, I am sure the serialization/deserialization is Ok, because if I take all components from aaa and add them to dataPanel I can see them. But in this way I loose the layout that's also serialized.
Is it possible to copy a JPanel this way (dataPanel = aaa)?
Is there some other way I can do this?
Thanks.