if(!isShowing()) { Component p = parent; if (p != null) p.repaint(0, getX(), getY(), width, height); } else
if (isShowing())
  public void repaint()  {    if(!isShowing())      {        Component p = parent;        if (p != null)          p.repaint(0, getX(), getY(), width, height);      }    else		repaint(0, 0, 0, width, height);	}