Graphics paint and repaint methods
AWT

Graphics Basic – AWT Drawing Part 0

In Java, Graphics objects take care of drawing works. The Graphics object draws the components of AWT components. In other words, all the AWT Components are linked with an AWT Graphics object which takes care of how to draw them. Note, java containers like Frame and Dialogs are also a component and hence they also contain the Graphics object. The Graphics object holds the drawing factors like Color, Font, Line Thickness. It also exposes methods to do drawings like Line, rectangle, Circle. When the program coder invokes the drawing methods on the Graphics objects, it applies the properties like Color, Fonts etc. to the drawing.