code: protected void paintDirtyRect (Graphics2D gfx, Rectangle rect)
      {
          // paint the behind the scenes stuff
          paintBehind(gfx, rect);
  
          // paint back sprites and animations
          paintBits(gfx, AnimationManager.BACK, rect);
  
          // paint the between the scenes stuff
          paintBetween(gfx, rect);
  
          // paint front sprites and animations
          paintBits(gfx, AnimationManager.FRONT, rect);
  
          // paint anything in front
          paintInFront(gfx, rect);
      }
docs: Paints all the layers of the specified dirty region.