Why does Swing JComponent class implement the interface Serializable? The way I\'ve implemented my views, they are stateless, all the state data is
Why does Swing JComponent class implement the interface Serializable?
Although this allows you to serialize classes and send them to and from the client and the server, this does not seem to be an intuitive scenario. There is a better chance, still slim, that someone might want to serialize components to a file. This will allow for that sort of serialization.
Are there better ways to remove [the warnings]?
You could instantiate the serialVersionUID, but if you do so you will need to maintain it when you class changes. This seems like overkill. Another option, as Laurence Gonsalves points out in his comment, is to suppress the warnings altogether in the Preferences->Java->Compiler->Errors/Warnings->Potential Programming Problems field.