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 ) ; } } }
Called when a close tab button is pressed .