title: Binding Fields to Controllers in Javafx
body: <p>I have built a scene in using scene builder and I have two textfields that are part of a UI, One for Flavor, one for Topping.  In the controller I've annotated each textfield attribute with @FXML. My question is: how do I associate the fields in the ui to the attributes in the controller class? </p>
  
  <p>The java code looks like:</p>
  
  <pre><code>@FXML
  private TextField flavorValueField;
  @FXML
  private TextField toppingValueField;
  </code></pre>
  
  <p>In the ui, the fields exist in a scene, but really have nothing associated with them that identifies them. Do they need something? and It's not clear to me, how I assure the binding between the field in the UI and the field in the code occur in the way I want them to. </p>
  
  <p>It's not enough to say, it just works. I want to understand how the code knows to bind one field in the UI to an attribute in the code. The UI fields are generic. There's no identifier or classifier that says, this one is flavor and that one is topping. If it just "works" how does the binding happen?</p>