gfx2.setClip(clip.x, clip.y, clip.width, clip.height); gfx2.translate(bounds.x, bounds.y);  visitor.visit(comp, gfx2);
gfx.setClip(clip.x, clip.y, clip.width, clip.height); clipped = true; gfx.translate(bounds.x, bounds.y); translated = true; visitor.visit(comp, gfx);
  private void visitChild(Graphics gfx, GfxVisitor visitor,                          Component comp)  {    Rectangle bounds = comp.getBounds();    Rectangle clip = gfx.getClipBounds().intersection(bounds);    if (clip.isEmpty()) return;    Graphics gfx2 = gfx.create();    try      {	gfx2.setClip(clip.x, clip.y, clip.width, clip.height);	gfx2.translate(bounds.x, bounds.y);	visitor.visit(comp, gfx2);      }    finally      {	gfx2.dispose ();      }  }