public void setGridSize(int rows, int cols) {
        if (rows == this.rows && cols == this.cols) {
            return;
        }

        SoundCell[][] newCells = new SoundCell[rows][cols];

        for (int r = 0; r < Math.min(rows, this.rows); r++) {
            newCells[r] = Arrays.copyOf(cells[r], cols);
        }

        //Fill out added cells
        for (int r = 0; r < rows; r++) {
            for (int c = 0; c < cols; c++) {
                if (newCells[r][c] == null) {
                    newCells[r][c] = new SoundCell("");
                }
            }
        }

        grid = createGrid(newCells);
        cells = newCells;
        this.rows = rows;
        this.cols = cols;

        setContent(grid);
    }