Why does Swing JComponent class implement the interface Serializable? The way I’ve implemented my views, they are stateless, all the state data is stored in a Presentation Model. So I don’t need to serialize my views. I’ve used a @SuppressWarnings("serial") annotation to remove the warnings. Are there better ways to remove them?
Why does Swing JComponent class implement the interface Serializable ? The way I’ve implemented
Share
In the beginning GUI builders were going to save the UI in serialised format. The
applettag even has an attribute to load from serialised form (I don’t know anyone else who has used that, and I’ve only used it to be malicious). Unfortunately using the serialisation mechanism for GUIs doesn’t really work. Swing only guarantees compatibility in within the same major release (and I’m guessing even that has few tests).