void (Component c, Graphics g, int x, int y) { UISettings.setupAntialiasing(g); if (myTextHeight <= 0) { myTextHeight = g.getFont().createGlyphVector(((Graphics2D)g).getFontRenderContext(), myText).getPixelBounds(null, 0, 0).height; } g.setColor(UIUtil.getLabelForeground()); g.drawString(myText, x + 2, y + myControlHeight - ((myControlHeight - myTextHeight) / 2)); }