public void highlight ( ) { final JTabbedPane parent = ( JTabbedPane ) this . getUiComponent ( ) . getParent ( ) ; //search through tabs until we find this one for ( int i = 0 ; i < parent . getTabCount ( ) ; i ++ ) { String title = parent . getTitleAt ( i ) ; if ( getTabCaption ( ) . equals ( title ) ) { //found this tab //create new colored label and set it into the tab final JLabel label = new JLabel ( getTabCaption ( ) ) ; label . setForeground ( new Color ( 0xff6633 ) ) ; parent . setTabComponentAt ( i , label ) ; //schedule a task to change back to original color Timer timer = new Timer ( ) ; TimerTask task = new TimerTask ( ) { @ Override public void run ( ) { label . setForeground ( Color . black ) ; } } ; timer . schedule ( task , 3000 ) ; break ; } } }
Highlights the tab using Burp s color scheme . The highlight disappears after 3 seconds .