public void setGridWidth(int gridWidth) {
        if(this.gridWidth != gridWidth)
        {
            this.gridWidth = gridWidth;
            this.removeAll();
            //this.grid = new JPanel[this.gridWidth][this.gridLength];
            this.grid = new GridCase[this.gridWidth][this.gridLength];
            this.setLayout(new GridLayout(this.gridWidth, this.gridLength));

            for(int y = 0; y < this.gridLength; y++)
            {
                for(int x = 0; x < this.gridWidth; x++)
                {   
                    //this.grid[x][y] = new JPanel();
                    this.grid[x][y] = new GridCase();
                    this.grid[x][y].setPositionX(x);
                    this.grid[x][y].setPositionY(y);
                    this.add(this.grid[x][y]);
                }
            }
        }
    }