SwingTabbox extends AbstractSwingContainer implements XulTabbox { public void removeTab( int idx ) { if ( tabpane.getTabCount() > idx ) { tabpane.remove( idx ); } } SwingTabbox( Element self, XulComponent parent, XulDomContainer domContainer, String tagName ); @Override void addChild( Element ele ); int getSelectedIndex(); XulTabpanel getSelectedPanel(); XulTabpanels getTabpanels(); XulTabs getTabs(); void setSelectedIndex( int index ); @Override void layout(); void setTabDisabledAt( boolean flag, int pos ); void removeTab( int idx ); void removeTabpanel( int idx ); void addTab( int idx ); void addTabpanel( int idx ); void setClosable( boolean flag ); boolean isClosable(); void setOnclose( String command );  }
@Test public void removeTabTest() throws Exception { XulTabs tabs = (XulTabs) doc.getElementById( "tabs" ); XulTab tab = (XulTab) doc.getElementById( "tab1" ); tabs.removeChild( tab ); assertEquals( 3, tabs.getTabCount() ); }