Question: repainting and clipping
Here is the answer.
Clipping is the process of confining paint operations to a limited area or shape. Clipping regions are set to the repinted window on the area that requires repainting.
When a window is repainted by the AWT painting thread, it sets the clipping regions tothe area of the window that requires repainting.