private void hideExitIn(int x, int y, ImageIcon icon) {
        if (!isExitSet) {
            isExitSet = true;
            this.mapGrid[x][y] = new Entity(Entity.EXIT, icon); //create and exit entity
            // hide the entity by displaying the path icon
            setValueAt(exitIcon, y, x);
            doorX = x;
            doorY = y;
        } else {
            putBoxIn(x, y);
        }
    }