code: public void disableTab (Tab tab, boolean disable) {
  		checkIfTabsBelongsToThisPane(tab);
  
  		TabButtonTable buttonTable = tabsButtonMap.get(tab);
  		buttonTable.button.setDisabled(disable);
  
  		if (activeTab == tab && disable) {
  			if (selectFirstEnabledTab()) {
  				return;
  			}
  
  			// there isn't any tab we can switch to
  			activeTab = null;
  			notifyListenersSwitched(null);
  		}
  
  		if (activeTab == null && allowTabDeselect == false) {
  			selectFirstEnabledTab();
  		}
  	}
docs: Disables or enables given tab.
  <p>
  When disabling, if tab is currently selected, TabbedPane will switch to first available enabled Tab. If there is no any
  other enabled Tab, listener {@link TabbedPaneListener#switchedTab(Tab)} with null Tab will be called.
  <p>
  When enabling Tab and there isn't any others Tab enabled and {@link #setAllowTabDeselect(boolean)} was set to false, passed
  Tab will be selected. If {@link #setAllowTabDeselect(boolean)} is set to true nothing will be selected, all tabs will remain
  unselected.
  @param tab tab to change its state
  @param disable controls whether to disable or enable this tab
  @throws IllegalArgumentException if tab does not belong to this TabbedPane