public void drawEmphasizedText(Graphics g,Color foreground,Color emphasis,String s,int underlinedIndex,int x,int y){
  Graphics2D g2d=(Graphics2D)g.create();
  g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
  g2d.setColor(emphasis);
  BasicGraphicsUtils.drawStringUnderlineCharAt(g2d,s,underlinedIndex,x,y + 1);
  g2d.setColor(foreground);
  BasicGraphicsUtils.drawStringUnderlineCharAt(g2d,s,underlinedIndex,x,y);
}

public void drawEmphasizedText ( Graphics g , Color foreground , Color emphasis , String s , int underlinedIndex , int x , int y ) { Graphics2D g2d = ( Graphics2D ) g . create ( ) ; g2d . setRenderingHint ( RenderingHints . KEY_TEXT_ANTIALIASING , RenderingHints . VALUE_TEXT_ANTIALIAS_ON ) ; g2d . setColor ( emphasis ) ; BasicGraphicsUtils . drawStringUnderlineCharAt ( g2d , s , underlinedIndex , x , y + 1 ) ; g2d . setColor ( foreground ) ; BasicGraphicsUtils . drawStringUnderlineCharAt ( g2d , s , underlinedIndex , x , y ) ; }
draw text with an emphasized background .
