Apparently Canvas is an AWT component and JPanel is a Swing component
and JPanel is the Swing equivalent to Canvas.  I read it is bad to mix
Swing and AWT components so we should stick to using JPanel for the
drawing.  The code should all be the same except your extending from a
JPanel.