@Override
    public void paint(Graphics g0) {
        super.paint(g0); // may be necessary for some look-and-feels?

        Graphics2D g = (Graphics2D) g0;

        Color c = getForeground();
        int w2 = Math.min(getWidth(), this.w);
        int h2 = Math.min(getHeight(), this.w);
        Rectangle r = new Rectangle((getWidth() / 2) - (w2 / 2), (getHeight() / 2) - (h2 / 2), w2, h2);

        if (c.getAlpha() < 255) {
            TexturePaint checkers = getCheckerPaint();
            g.setPaint(checkers);
            g.fillRect(r.x, r.y, r.width, r.height);
        }
        g.setColor(c);
        g.fillRect(r.x, r.y, r.width, r.height);
        PlafPaintUtils.drawBevel(g, r);
    }