title: Why am I getting a stackoverflow when loading my fxml?
body: <p>I've adjusted my controller constructor and fxml so that all setup of the fxml to the controller is in the fxml except for the FXML construction and the fxml loading. Here is my controller:</p>
  
  <pre><code>public class MainOverviewTab extends Tab {
  
  @FXML private AnchorPane content;
  
  public MainOverviewTab() {
      FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("main_overview_tab.fxml"));
      // fxmlLoader.setRoot(content);
      // fxmlLoader.setController(this);      
  
      try {
          fxmlLoader.load();
      } catch (Exception e) {
          e.printStackTrace();
      }
  }
  </code></pre>
  
  <p>and my fxml file:</p>
  
  <pre><code>&lt;AnchorPane id="AnchorPane" 
      fx:id="content" 
      fx:controller="dominion.application.controller.MainOverviewTab"
      ...other settings &gt;
  
          &lt;children&gt;
              ....
          &lt;/children&gt;
  &lt;/AnchorPane&gt;
  </code></pre>
  
  <p>The stackoverflow occurs when the fxmlLoader.load() is called and goes back to FXMLLoader fxmlLoader = new FXMLLoader(...) and then fxmlLoader.load() is called again... Why is this happening and how do I keep my controller constructor the same and load the fxml the same? Or is this not possible?</p>