void (final JComponent component) { assertIsDispatchThread(); final int index=indexOfComponent(component); if(index==-1){ throw new IllegalArgumentException("component not found in tabbed pane wrapper"); } setSelectedIndex(index); }