Rectangle repaintRec = rec0.union(rec1);
Rectangle repaintRec = SwingUtilities.computeUnion(rec0.x, rec0.y, rec0.width, rec0.height, rec1);
  protected void damageLineRange (int line0, int line1, Shape a, Component host)  {    if (a == null)      return;    Rectangle rec0 = lineToRect(a, line0);    Rectangle rec1 = lineToRect(a, line1);    if (rec0 == null || rec1 == null)      // something went wrong, repaint the entire host to be safe      host.repaint();    else      {        Rectangle repaintRec = rec0.union(rec1);        host.repaint(repaintRec.x, repaintRec.y, repaintRec.width,                     repaintRec.height);      }      }