public static void drawStringUnderlineCharAt(JComponent c,Graphics g,String text,int underlinedIndex,int x,int y){
  if (drawStringUnderlineCharAtMethod != null) {
    try {
      drawStringUnderlineCharAtMethod.invoke(null,new Object[]{c,g,text,new Integer(underlinedIndex),new Integer(x),new Integer(y)});
      return;
    }
 catch (    IllegalArgumentException e) {
    }
catch (    IllegalAccessException e) {
    }
catch (    InvocationTargetException e) {
    }
  }
  Graphics2D g2=(Graphics2D)g;
  Map oldRenderingHints=installDesktopHints(g2);
  BasicGraphicsUtils.drawStringUnderlineCharAt(g,text,underlinedIndex,x,y);
  if (oldRenderingHints != null) {
    g2.addRenderingHints(oldRenderingHints);
  }
}

public static void drawStringUnderlineCharAt ( JComponent c , Graphics g , String text , int underlinedIndex , int x , int y ) { if ( drawStringUnderlineCharAtMethod != null ) { try { drawStringUnderlineCharAtMethod . invoke ( null , new Object [ ] { c , g , text , new Integer ( underlinedIndex ) , new Integer ( x ) , new Integer ( y ) } ) ; return ; } catch ( IllegalArgumentException e ) { } catch ( IllegalAccessException e ) { } catch ( InvocationTargetException e ) { } } Graphics2D g2 = ( Graphics2D ) g ; Map oldRenderingHints = installDesktopHints ( g2 ) ; BasicGraphicsUtils . drawStringUnderlineCharAt ( g , text , underlinedIndex , x , y ) ; if ( oldRenderingHints != null ) { g2 . addRenderingHints ( oldRenderingHints ) ; } }
draws the string at the specified location underlining the specified character .
