}
  protected void paintText(Graphics g, JMenuItem menuItem, Rectangle textRect,                           String text)  {    Font f = menuItem.getFont();    g.setFont(f);    FontMetrics fm = g.getFontMetrics(f);    if (text != null && ! text.equals(""))      {	if (menuItem.isEnabled())	  g.setColor(menuItem.getForeground());	else	  // FIXME: should fix this to use 'disabledForeground', but its	  // default value in BasicLookAndFeel is null.	  	  g.setColor(Color.gray);	int mnemonicIndex = menuItem.getDisplayedMnemonicIndex();	if (mnemonicIndex != -1)	  BasicGraphicsUtils.drawStringUnderlineCharAt(g, text, mnemonicIndex,	                                               textRect.x,	                                               textRect.y	                                               + fm.getAscent());	else    BasicGraphicsUtils.drawString(g, text, 0, textRect.x,                                  textRect.y + fm.getAscent());  }  }