g.drawString(title, textRect.x, textRect.y + metrics.getAscent());
g.drawString(title, textRect.x, textRect.y + ascent);
  protected void paintText(Graphics g, int tabPlacement, Font font,                           FontMetrics metrics, int tabIndex, String title,                           Rectangle textRect, boolean isSelected)  {    g.setFont(font);    View textView = getTextViewForTab(tabIndex);    if (textView != null)      {        textView.paint(g, textRect);        return;      }    int mnemIndex = tabPane.getDisplayedMnemonicIndexAt(tabIndex);    if (tabPane.isEnabled() && tabPane.isEnabledAt(tabIndex))      {    Color fg = tabPane.getForegroundAt(tabIndex);        if (isSelected && (fg instanceof UIResource))      {            Color selectionForeground =              UIManager.getColor("TabbedPane.selectionForeground");            if (selectionForeground != null)              fg = selectionForeground;          }        g.setColor(fg);        if (mnemIndex != -1)          BasicGraphicsUtils.drawStringUnderlineCharAt(g, title, mnemIndex,                                                       textRect.x,                                                       textRect.y                                                       + metrics.getAscent());        else          g.drawString(title, textRect.x, textRect.y + metrics.getAscent());      }    else      {        Color bg = tabPane.getBackgroundAt(tabIndex);        g.setColor(bg.brighter());        if (mnemIndex != -1)          BasicGraphicsUtils.drawStringUnderlineCharAt(g, title, mnemIndex,                                                       textRect.x, textRect.y);        else          g.drawString(title, textRect.x, textRect.y);        g.setColor(bg.darker());        if (mnemIndex != -1)          BasicGraphicsUtils.drawStringUnderlineCharAt(g, title, mnemIndex,                                                       textRect.x + 1,                                                       textRect.y + 1);        else          g.drawString(title, textRect.x + 1, textRect.y + 1);      }  }