question: protected Rectangle paintCloseButton ( Graphics g , SynthContext tabContext , int tabIndex ) { Rectangle tabRect = new Rectangle ( rects [ tabIndex ] ) ; Rectangle bounds = getCloseButtonBounds ( tabIndex ) ; int offset = bounds . width + textIconGap ; boolean onLeft = isCloseButtonOnLeft ( ) ; if ( onLeft ) { tabRect . x += offset ; tabRect . width -= offset ; } else { tabRect . width -= offset ; } SeaGlassContext subcontext = getContext ( tabPane , SeaGlassRegion . TABBED_PANE_TAB_CLOSE_BUTTON , getCloseButtonState ( tabPane , tabIndex , ( tabContext . getComponentState ( ) & MOUSE_OVER ) != 0 ) ) ; SeaGlassLookAndFeel . updateSubregion ( subcontext , g , bounds ) ; SeaGlassSynthPainterImpl painter = ( SeaGlassSynthPainterImpl ) subcontext . getPainter ( ) ; painter . paintSearchButtonForeground ( subcontext , g , bounds . x , bounds . y , bounds . width , bounds . height ) ; subcontext . dispose ( ) ; return tabRect ; }
target:  Paint the close button for a tab.