}
  public synchronized void addInvalidComponent(JComponent component)  {    Component ancestor = component.getParent();    while (ancestor != null           && (! (ancestor instanceof JComponent)               || ! ((JComponent) ancestor).isValidateRoot() ))      ancestor = ancestor.getParent();    if (ancestor != null        && ancestor instanceof JComponent        && ((JComponent) ancestor).isValidateRoot())      component = (JComponent) ancestor;    if (invalidComponents.contains(component))      return;    invalidComponents.add(component);        if (! repaintWorker.isLive())      {        repaintWorker.setLive(true);        SwingUtilities.invokeLater(repaintWorker);      }  }