if (p != null && p instanceof JComponent)
if (p instanceof JComponent)
  public void scrollRectToVisible(Rectangle r)	{    Component p = getParent();    if (p != null && p instanceof JComponent)      ((JComponent) p).scrollRectToVisible(r);	}