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