title: problems connecting fields from .java files to fxml in the controller file when the fxml controller() is set OUTSIDE of the fxml
body: <p>thanks in advance. This is my first go away from tutorials etc.. so bare with...</p>
  <p>I have a main fxml screen that is the blank area for which projects (objects) will be created. The main fxml has a menu and I can create projects (via a dialogue window) that prompts a titledpane to be made.</p>
  <p>The titledpane and its contents (project information) are a seperate fxml file.</p>
  <p>When the titledpane is created, the contoller is set from the java file, Not the fxml.
  However when trying to link the fields to get data to the TitledPane Text boxes the conrtoller file doesn't link through and 'exmapleText' (see below) is 'never used' and greyed out.</p>
  <pre><code>@FXML
  private Text exampleText; 
  </code></pre>
  <p>I have only ever set the controller in the FXML file before.
  Trying to cut the <code>fxmlLoader.setController(this)</code> and updating the fxml to include one means the titledpane crashes on fxml.load()</p>
  <p>I have tried changing the <code>&lt;fx:root</code> in the fxml file to just be a <code>&lt;TitledPane&gt;</code> give it it's own id, and add a field in the controller... but always crash at the same <code>fxmlLaoader.load()</code> in the controller class.</p>
  <p><a href="https://i.stack.imgur.com/7Q3Hj.png" rel="nofollow noreferrer">fxml file</a>
  <a href="https://i.stack.imgur.com/R6r2c.png" rel="nofollow noreferrer">controller file</a></p>
  <p>Many thanks, I hope it makes sense.</p>