I thought most people used JPanel for painting on nowadays.
Go and look through the API for Canvas and you find it has a paint method. You will have to extend Canvas and override the paint method, something like this:-At least I think you do; I have never tried. The bit about super.paint clears the Canvas so you start on a blank screen.