Canvas
is not "Window". In order to display anything on the screen, you components must be added to a window delegate.
I would, personally, avoid overriding the paint
methods of top level containers. The main reason for this is top level containers are not double buffered and it makes your application less portable. It's much easier to add a component to other components, a frame is pretty final.
I would also use JPanel
over Canvas, simply because JPanel
is double buffered.