question: @ Override public void paintIcon ( Component c , Graphics g , int x , int y ) { Painter painter = ( Painter ) UIManager . get ( prefix + "[Enabled]." + key ) ; if ( painter != null ) { JComponent jc = ( c instanceof JComponent ) ? ( JComponent ) c : null ; Graphics2D gfx = ( Graphics2D ) g ; gfx . translate ( x , y ) ; painter . paint ( gfx , jc , width , height ) ; gfx . translate ( - x , - y ) ; } }
target:  Implements the standard Icon interface's paintIcon method as the standard synth stub passes null for the context and this will cause us to not paint any thing, so we override here so that we can paint the enabled state if no synth context is available