g.setFont(oldFont);
  public void paint(Graphics g, JComponent c)  {    JToolTip tip = (JToolTip) c;    String text = tip.getTipText();    Toolkit t = tip.getToolkit();    if (text == null)      return;    Rectangle vr = new Rectangle();    vr = SwingUtilities.calculateInnerArea(tip, vr);    Rectangle ir = new Rectangle();    Rectangle tr = new Rectangle();    FontMetrics fm = t.getFontMetrics(tip.getFont());    int ascent = fm.getAscent();    SwingUtilities.layoutCompoundLabel(tip, fm, text, null,                                       SwingConstants.CENTER,                                       SwingConstants.CENTER,                                       SwingConstants.CENTER,                                       SwingConstants.CENTER, vr, ir, tr, 0);    Color saved = g.getColor();    g.setColor(Color.BLACK);    g.drawString(text, vr.x, vr.y + ascent);         g.setColor(saved);     }