Just a warning: serialization of GUI components like JButton is not meant
for long term storage, nor for exchange between systems that may have
different versions of the JVM (since the serialization format is not guaranteed
to be stable between versions).
See http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/JButton.html
> Just a warning: serialization of GUI components like
> JButton is not meant
> for long term storage, nor for exchange between
> systems that may have
> different versions of the JVM (since the
> serialization format is not guaranteed
> to be stable between versions).
Use XMLEncoder and XMLDecoder to serialize and store it if you're worried about different formats between JVMs.