warning: [serial] serializable class SomeClass has no definition of serialVersionUID

This warning comes when you derive from a class that implements Serializable. In your case, the Serializable parent class is JFrame.

You can suppress this warning with @SuppressWarnings("serial"), or give the class a serialVersionUID: private static final long serialVersionUID = ...; (with a long value for the dots).

There is a discussion here on SO on which is preferable.


JFrame implements Serializable, so all extending classes also implement Serializable.

Here's a tutorial about Serializable and serialVersionUID, but to really understand the topic you should read Chapter 11 of Effective Java (2nd Ed) by Joshua Bloch


If you know your application never serializes things, add -Xlint:-serial to command line arguments of javac. For example,

javac -Xlint -Xlint:-serial *****

This way you will have all warnings except "serial".