public Panel(Frame frame, int width, int height, BufferedImage bg) {
        setOpaque(false);
        setLayout(null);
        setDoubleBuffered(true);
        setBorder(null);
        setFocusable(true);
        this.frame = frame;
        w = width; h = height;
        this.bg = bg;
    }