The paint() method supports painting via a Graphics object. The repaint() method is used to cause paint() tobe invoked by the AWT painting thread.