question: protected void paintDisabledText ( JLabel l , Graphics g , String s , int textX , int textY ) { int accChar = l . getDisplayedMnemonicIndex ( ) ; Color background = l . getBackground ( ) ; g . setColor ( background . brighter ( ) ) ; SwingUtilities2 . drawStringUnderlineCharAt ( l , g , s , accChar , textX + 1 , textY + 1 ) ; g . setColor ( background . darker ( ) ) ; SwingUtilities2 . drawStringUnderlineCharAt ( l , g , s , accChar , textX , textY ) ; }
target:  Paint clippedText at textX, textY with background.lighter() and then shifted down and to the right by one pixel with background.darker().