public final synchronized int indexOfComponent(final JComponent component) {
    for (int i = 0; i < tabbedPane.getTabCount(); i++) {
      final JComponent c = getWrapperAt(i).getComponent();
      if (c == component) {
        return i;
      }
    }
    return -1;
  }
public final synchronized int indexOfComponent(final JComponent component)