Actions can often be implemented using anonymous inner classes. However,
make sure, that there are no (even merely implicit) references to
unserializable classes in the Action class.
All Swing classes should be treated as unserializable, so if your
Action has a reference to a Swing class, it becomes unserializable,
too. While this was comparatively unproblematic under JDK1.2, it has
become a problem with JDK1.3 and further. Here the compiler will
create an implicit reference to the enclosing class's instance for
each inner class compiled. Therefore, you cannot define Actions as
inner classes of Swing components. Defining Actions as inner classes
of
FormSheets
,
FormSheetContentCreators
, and other Framework classes, however, should be safe.