not to be confused with Container.paintComponents. In Swing, you override the paintComponent method of your JComponent,
usually a JPanel, rather than the paint method of a Canvas as you do in
AWT (Advanced Windowing Toolkit). Here is some sample code to make a simple drawing,
and save it as a *.png image file.