How to access boolean array Java
<p>I have the following constructor which defines a <code>board</code> and checks if any of the three <code>JButton</code>s have been clicked:</p>

<pre><code>Timer timer = new Timer(500, this);

private boolean[][] board;
private boolean isActive = true;
private int height;
private int width;
private int multiplier = 40;

JButton button1;
JButton button2;
JButton button3;
public Board(boolean[][] board) {
    this.board = board;
    height = board.length;
    width = board[0].length;
    setBackground(Color.black);
    button1 = new JButton("Stop");
    add(button1);
    button1.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            isActive = !isActive;
            button1.setText(isActive ? "Stop" : "Start");
        }
    });
    button2 = new JButton("Random");
    add(button2);
    button2.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            this.board = randomBoard();
        }
    });
    button3 = new JButton("Clear");
    add(button3);
    button3.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            this.board = clearBoard();
        }
    });
}
</code></pre>

<p>But it returns this error:</p>

<pre><code>Exception in thread "main" java.lang.Error: Unresolved compilation problems: 
    board cannot be resolved or is not a field
    board cannot be resolved or is not a field
</code></pre>

<p>Why is this? How do I access <code>this.board</code> in the constructor?</p>
