Problem description
Swing components implement Serializable
. There are some historical reasons as to why that is (see Meta section).
However apart from these reasons I vaguely remember having read about the JVM serializing JComponent
objects and derivates for supposedly performance reasons(?) during runtime. This was stored firmly in my mind, after having read some source on this topic a while ago, however as I attempted to verify this I was unable to discover any sources stating something similar.
Questions
- Does the JVM serialize / deserialize Swing components during runtime for performance reasons without explicitely calling for serialization programatically?
- Is there a source describing this phenomenon?
- If the JVM were to do that, is it then possible for standard serial UIDs (as opposed to generated ones) to cause runtime errors, when there is only one JVM and no explicit serialization / deserialization involved? Standard IDs have a form such as:
private static final long serialVersionUID = 1L;
As of now I am lead to believe that my memory is plain wrong. There is no mention of runtime serialization of JComponent
s in any of those sources. Can this be confirmed / rejected?
Meta
Related to this question: