title: javafx with Scene Builder cannot getText from textField
body: <p>I am a starter of javafx. I am trying to create a form which can store the input by clicking a button. However, it has error and I cannot proceed.
  Here is my code:</p>
  
  <p>In fxml file:</p>
  
  <pre><code> &lt;VBox prefHeight="300.0" prefWidth="400.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ass.InputDataController"&gt;
     &lt;children&gt;
        &lt;Label text=" Input" /&gt;
        &lt;TextField id="Input" fx:id="Input" onAction="#handleButtonAction" /&gt;
        &lt;Button fx:id="enter" onAction="#handleButtonAction" prefHeight="57.0" prefWidth="707.0" text="Enter" /&gt;
     &lt;/children&gt;
  &lt;/VBox&gt; 
  </code></pre>
  
  <p>In InputDataController.java:</p>
  
  <pre><code>  public class InputDataController implements Initializable {
    @FXML
    private TextField Input;
    @FXML
    private void handleButtonAction(ActionEvent event) {
       String t = Input-&gt;getText();
    }
      @Override
      public void initialize(URL url, ResourceBundle rb) {
      // TODO
      }
  }
  </code></pre>
  
  <p>The error say:</p>
  
  <pre><code>error: incompatible types: String is not a functional interface
          String t = Input-&gt;getText();
  </code></pre>
  
  <p>I have tried to implement another function:</p>
  
  <pre><code>@FunctionalInterface
      interface String {
          String getText(TextField t);
      }
  </code></pre>
  
  <p>But it still states that:</p>
  
  <pre><code>error: cannot find symbol
  </code></pre>
  
  <p>Is there any method to solve this problem? It will be better if I don't have to implement a functional interface!</p>