src/main/java/com/spinyowl/legui/component/TabbedPanel.java
public void removeTab(Tab tabToRemove) {
    Objects.requireNonNull(tabToRemove);
    int index = tabs.indexOf(tabToRemove);
    tabs.remove(tabToRemove);
    ToggleButton button = tabButtons.remove(tabToRemove);

    // remove button from tab strip
    tabStrip.removeTabButton(button);
    tabStrip.updateStyles();

    // remove content from container
    container.remove(tabToRemove.tabComponent);

    if (!tabs.isEmpty()) {
      if (index < tabs.size()) {
        setActiveTab(tabs.get(index));
      } else {
        setActiveTab(tabs.get(index - 1));
      }
    }
  }
/**
   * Removes specified tab.
   *
   * @param tabToRemove tab to remove.
   */
Removes specified tab.
@param tabToRemove tab to remove.
Removes specified tab . @param tabToRemove tab to remove .
public void removeTab(Tab tabToRemove) {
    Objects.requireNonNull(tabToRemove);
    int index = tabs.indexOf(tabToRemove);
    tabs.remove(tabToRemove);
    ToggleButton button = tabButtons.remove(tabToRemove);
    tabStrip.removeTabButton(button);
    tabStrip.updateStyles();
    container.remove(tabToRemove.tabComponent);
    if (!tabs.isEmpty()) {
      if (index < tabs.size()) {
        setActiveTab(tabs.get(index));
      } else {
        setActiveTab(tabs.get(index - 1));
      }
    }
  }
public void removeTab ( Tab tabToRemove ) { Objects . requireNonNull ( tabToRemove ) ; int index = tabs . indexOf ( tabToRemove ) ; tabs . remove ( tabToRemove ) ; ToggleButton button = tabButtons . remove ( tabToRemove ) ; tabStrip . removeTabButton ( button ) ; tabStrip . updateStyles ( ) ; container . remove ( tabToRemove . tabComponent ) ; if ( ! tabs . isEmpty ( ) ) { if ( index < tabs . size ( ) ) { setActiveTab ( tabs . get ( index ) ) ; } else { setActiveTab ( tabs . get ( index - 1 ) ) ; } } }
Removes specified tab.
Removes specified tab .
// remove button from tab strip // remove content from container