The "Drawing" class contains the main method for this program.

This example defines a simple Swing-based drawing application which uses serialisation
to load and save the images created.  This makes the load and save functions in
"DrawingCanvas" extremely simple, for instance the 'moving parts' of the load function
are:

		FileInputStream s = new FileInputStream (f);
		ObjectInputStream o = new ObjectInputStream (s);
		Vector v = (Vector) o.readObject ();
		o.close ();

the first operation opens the file specified by "f" (an alternative constructor taking
a path-name as a String could be used), the second operation creates an object input
stream over the file and then the third operation reads the saved drawing from the
object input stream.  The drawing is represented by a Vector containing instances of
the "Splodge" class which represents the shapes which have been drawn.  This means that 
it's only necessary to load/save the Vector itself -- serialisation will deal with
loading/saving all of the objects reached from the Vector.

Notice how the "Splodge" nested class has been written.  It has to be marked 
"Serializable" to indicate that the programmer is happy for instances of it to be
automatically loaded and saved.  It has a 0-argument constructor which the 
serialization library will invoke to create new instances when loading them
(actually, because no constructor is defined explicitly in the source code, the
compiler adds a default 0-argument constructor as it always does in that case).
Finally, the class is a "static" nested class meaning that instances of "Splodge"
do not hold a link back to an 'enclosing' instance of "DrawingCanvas".  This is
important here because otherwise serialization would continue through that link
and try to save the entire state of the Swing components involved as well as the
state of the shapes.

You could try updating the "Splodge" class so that it uses a different format
when writing data during serialization -- for instance a text-based or XML-style
format.  You would need to update "Vector" as well, or use an alternative collection
class.