public void addTab(String title,Component component,boolean isClosable){
  super.addTab(title,component);
  if (isClosable && component instanceof Watch) {
    closeableTabs.add((Watch)component);
  }
}

public void addTab ( String title , Component component , boolean isClosable ) { super . addTab ( title , component ) ; if ( isClosable && component instanceof Watch ) { closeableTabs . add ( ( Watch ) component ) ; } }
adds a tab to the panel .
