bg.setColor(Color.BLACK); bg.fillRect(0, 0, this.getWidth(), this.getHeight());
    public void paint(Graphics g)    {        if (isGuiInited())        {            Dimension d = this.getPreferredSize();            //make image buffer so tile selector doesn't flash black            Image buffer = this.createImage(d.width, d.height);            Graphics bg = buffer.getGraphics();            //black background so grid is black            bg.setColor(Color.BLACK);            bg.fillRect(0, 0, this.getWidth(), this.getHeight());            //draw tiles            for (int tile = 0; tile < getTileCount(); tile++)                drawTile(bg, tile);            //draw highlight on current tile            highlightTile(bg, currentTile);            //draw buffer to screen            g.drawImage(buffer, 0, 0, this);        }    }