Component parent = getParent(); if (parent != null) { parent.repaint(tm, x + getX(), y + getY(), w, h); }
super.repaint(tm, x, y, w, h);
  public void repaint(long tm, int x, int y, int w, int h)  {    Component parent = getParent();    if (parent != null)      {        parent.repaint(tm, x + getX(), y + getY(), w, h);      }  }