public static void drawTransparent(Graphics g, int x, int y, int width, int height)
    {
        Shape clip = g.getClip();
        g.clipRect(x, y, width, height);
        int size = 8;
        for (int xx = 0; xx <= width / size; xx++)
            for (int yy = 0; yy <= height / size; yy++)
            {
                if ((xx + yy) % 2 == 0)
                    g.setColor(Color.LIGHT_GRAY);
                else
                    g.setColor(Color.GRAY);
                g.fillRect(x + xx * size, y + yy * size, size, size);
            }
        g.setClip(clip);
    }