private void disposeAnimationAndRemoveComponent() {
    if (myAnimator != null) {
      Disposer.dispose(myAnimator);
    }
    if (component != null) {
      myLayeredPane.remove(component);
      myLayeredPane.revalidate();
      myLayeredPane.repaint();
      component = null;
    }
  }
private void disposeAnimationAndRemoveComponent()