public void onRemoveTab ( final AjaxRequestTarget target , final int index ) { final int tabSize = getTabs ( ) . size ( ) ; // there have to be at least one tab on the ajaxTabbedPanel... if ( ( 2 <= tabSize ) && ( index < tabSize ) ) { setSelectedTab ( index ) ; getTabs ( ) . remove ( index ) ; target . add ( this ) ; } }
On remove tab removes the tab of the given index .