public void draw(Graphics g) {
        //Graphics2D g2 = (Graphics2D)g;
        //g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
        //	RenderingHints.VALUE_ANTIALIAS_ON);
        g.setColor(needsHighlight() ? selectColor : lightGrayColor);
        Font f = new Font("SansSerif", 0, size);
        g.setFont(f);
        FontMetrics fm = g.getFontMetrics();
        int i;
        int maxw = -1;
        for (i = 0; i != lines.size(); i++) {
            int w = fm.stringWidth((String) (lines.elementAt(i)));
            if (w > maxw) {
                maxw = w;
            }
        }
        int cury = y;
        setBbox(x, y, x, y);
        for (i = 0; i != lines.size(); i++) {
            String s = (String) (lines.elementAt(i));
            if ((flags & FLAG_CENTER) != 0) {
                x = (sim.getWinSize().width - fm.stringWidth(s)) / 2;
            }
            g.drawString(s, x, cury);
            if ((flags & FLAG_BAR) != 0) {
                int by = cury - fm.getAscent();
                g.drawLine(x, by, x + fm.stringWidth(s) - 1, by);
            }
            adjustBbox(x, cury - fm.getAscent(),
                    x + fm.stringWidth(s), cury + fm.getDescent());
            cury += fm.getHeight();
        }
        x2 = boundingBox.x + boundingBox.width;
        y2 = boundingBox.y + boundingBox.height;
    }