if (rects == null) rects = new Rectangle[tabCount]; if (tabCount == rects.length) return; else
if (rects.length < tabCount)
  protected void assureRectsCreated(int tabCount)  {    if (rects == null)      rects = new Rectangle[tabCount];    if (tabCount == rects.length)      return;    else      {        int numToCopy = Math.min(tabCount, rects.length);        Rectangle[] tmp = new Rectangle[tabCount];        System.arraycopy(rects, 0, tmp, 0, numToCopy);        rects = tmp;      }  }