final String info = UIBundle.message("memory.usage.panel.message.text", Long.toString(used), Long.toString(total));
final FontMetrics fontMetrics = g.getFontMetrics();
final int infoWidth = fontMetrics.charsWidth(info.toCharArray(), 0, info.length());
final int infoHeight = fontMetrics.getHeight() - fontMetrics.getDescent();
UIUtil.applyRenderingHints(g2);
<BUG>g2.setColor(Color.black);
g2.drawString(info, xOffset + (totalBarLength - infoWidth) / 2, yOffset + (barHeight + infoHeight) / 2 - 1);</BUG>
bg.dispose();
}
g.drawImage(myBufferedImage, 0, 0, null);

final String info = UIBundle.message("memory.usage.panel.message.text", Long.toString(used), Long.toString(total));
final FontMetrics fontMetrics = g.getFontMetrics();
final int infoWidth = fontMetrics.charsWidth(info.toCharArray(), 0, info.length());
final int infoHeight = fontMetrics.getHeight() - fontMetrics.getDescent();
UIUtil.applyRenderingHints(g2);
g2.setColor(UIUtil.getListForeground());
g2.drawString(info, xOffset + (totalBarLength - infoWidth) / 2, yOffset + (barHeight + infoHeight) / 2 - 1);
bg.dispose();
}
g.drawImage(myBufferedImage, 0, 0, null);
