Graphics2D g2 = (Graphics2D)g;
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
String s = "Camelopardalis";
Font font = new Font("Serif", Font.PLAIN, 32);
if (mTextLayout == null) {
FontRenderContext frc = g2.getFontRenderContext();
mTextLayout = new TextLayout(s, font, frc);
}
mTextLayout.draw(g2, mX, mY);