title: JavaFx element not binding to controller variable on fx:id
body: <p>This is likely pilot error, but the FXML attribute is not binding to the controller class on fx:id. I've whittled it down to a trivial example, but still "no joy". What am I overlooking?</p>
  
  <p>FXML file...</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;?import javafx.scene.layout.AnchorPane?&gt;
  &lt;?import javafx.scene.layout.BorderPane?&gt;
  
  &lt;BorderPane fx:id="mainFrame" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8.0.65" xmlns:fx="http://javafx.com/fxml/1" fx:controller="sample.controller.BorderPaneCtrl"&gt;
    &lt;left&gt;
      &lt;AnchorPane fx:id="anchorPaneLeft" prefHeight="200.0" prefWidth="200.0" BorderPane.alignment="CENTER" /&gt;
    &lt;/left&gt;
  &lt;/BorderPane&gt;
  </code></pre>
  
  <p>The associated Java code is...</p>
  
  <pre><code>package sample.controller;
  
  import javafx.fxml.FXML;
  import javafx.scene.layout.AnchorPane;
  
  public class BorderPaneCtrl {
      @FXML private AnchorPane anchorPaneLeft;
  
      public BorderPaneCtrl() {
          /* so, @FXML-annotated variables are accessible, but not
           *   yet populated
           */
          if (anchorPaneLeft == null) {
              System.out.println("anchorPaneLeft is null");
          }
      }
  
  /* this is what was missing...added for "completeness"
   */
  @FXML
  public void initialize() {
      /* anchorPaneLeft has now been populated, so it's now
       *   usable
       */
      if (anchorPaneLeft != null) {
          // do cool stuff
      }
  }
  </code></pre>
  
  <p>Ego is not an issue here, I'm pretty sure I'm overlooking something simple.</p>