@Override
    public void setTitleAt(int index, String title) {
    	Component tabCom = this.getTabComponentAt(index);
    	if (tabCom != null && tabCom instanceof JPanel) {
    		Component c = ((JPanel)tabCom).getComponent(0);
			if (c != null && c instanceof JLabel) {
				((JLabel)c).setText(title);
			}
    	}
      else {
        super.setTitleAt(index, title);
      }
    }
@ Override public void setTitleAt ( int index , String title ) { Component tabCom = this . getTabComponentAt ( index ) ; if ( tabCom != null && tabCom instanceof JPanel ) { Component c = ( ( JPanel ) tabCom ) . getComponent ( 0 ) ; if ( c != null && c instanceof JLabel ) { ( ( JLabel ) c ) . setText ( title ) ; } } else { super . setTitleAt ( index , title ) ; } }
Set the title of the tab when hiding/showing tab names.