code: protected void doClose(int tabIndex) {
          if (tabCloseListener == null || tabCloseListener.tabAboutToBeClosed(tabIndex)) {
              String    title     = tabPane.getTitleAt(tabIndex);
              Component component = tabPane.getComponentAt(tabIndex);
  
              tabPane.removeTabAt(tabIndex);
  
              if (tabCloseListener != null) {
                  tabCloseListener.tabClosed(title, component);
              }
          }
      }
docs: Called when a close tab button is pressed.
  
  @param tabIndex TODO