When a window is repainted by the AWT painting thread, it sets the clipping regions to the area of thewindow that requires repainting.