if (!copy.isEmpty())
if (!copy.isEmpty() && g.hitClip(copy.x, copy.y, copy.width, copy.height))
  public void paint(Graphics g, Shape a)  {    // Adjust size if the size is changed.    Rectangle bounds = a.getBounds();    if (bounds.width != getWidth() || bounds.height != getHeight())      setSize(bounds.width, bounds.height);    Rectangle inside = getInsideAllocation(a);    Rectangle copy = new Rectangle(inside);    int count = getViewCount();    for (int i = 0; i < count; ++i)      {        copy.setBounds(inside);        childAllocation(i, copy);        if (!copy.isEmpty())        paintChild(g, copy, i);      }  }