boolean isToolBarButton(JComponent c){
  return (c.getParent() instanceof JToolBar);
}

boolean isToolBarButton ( JComponent c ) { return ( c . getParent ( ) instanceof JToolBar ) ; }
is tool bar button
