title: JavaFX can't find symbol
body: <pre class="lang-java prettyprint-override"><code>package cs1302.gui;
  
  import javafx.application.Application;
  import javafx.stage.Stage;
  import javafx.scene.Scene;
  import javafx.scene.layout.HBox;
  import javafx.scene.text.Text;
  import javafx.scene.control.Button;
  import javafx.event.ActionEvent;
  import javafx.event.EventHandler;
  
  /**
   * Represents a small example app written using JavaFX.
   */
  public class ExampleApp extends Application {
  
      /**
       * {@inheritDoc}
       */
      @Override
      public void start(Stage stage) {
  
          Text hello = new Text(&quot;Hello World!!!&quot;);
          Button button = new Button(&quot;Click me!&quot;);
          button.setOnAction(buttonHandler);
  
          HBox root = new HBox();
          root.getChildren().add(button);
          root.getChildren().add(hello);
  
          Scene scene = new Scene(root);
  
          stage.setScene(scene);
          stage.sizeToScene();
          stage.setTitle(&quot;ExampleApp!&quot;);
          stage.show();
  
      } // start
  
      public final void setOnAction(EventHandler&lt;ActionEvent&gt; value) {
          EventHandler&lt;ActionEvent&gt; buttonHandler = event -&gt; System.out.println(&quot;you clicked me!&quot;);
      }
  } // ExampleApp
  </code></pre>
  <hr />
  <p>The problem is that when I compile, the error is cannot find <code>button.setOnAction(buttonHandler)</code>;</p>
  <p>I want to know how to fix it.</p>