title: How to embed all FXML nested controllers in one time?
body: <p>I'm programming a JavaFX app and I need to retrieve all controllers (buttons, text fields and a color picker) from my view.</p>
  
  <p>So I created a controller class in order to load all controllers:</p>
  
  <pre><code>public class GeneralController extends BorderPane implements Initializable {
  
      @FXML private Button btnNew;
      @FXML private Button btnOpen;
      @FXML private Button btnSave;
      @FXML private Button btnShare;
      @FXML private Button btnHelp;
      @FXML private Button btnAbout;
  
      @FXML private ColorPicker clrSelectColor; 
      @FXML private Button btnPencil;
      @FXML private Button btnArrow;
      @FXML private Button btnCircle;
      @FXML private Button btnLine;
      @FXML private Button btnTriangle;
      @FXML private Button btnRectangle;
      @FXML private TextField nbcThickness;
      @FXML private Button btnConfirmThickness;
  
      @FXML private Button btnCropImg;
      @FXML private Button btnRotateImg;
      @FXML private Button btnInverseImg;
  
      @FXML private Canvas paintCanvas;
      private GraphicsContext gc;
  
      public GeneralController() {
          FXMLLoader fl = new FXMLLoader(getClass().getResource("/view/Window.fxml"));
           fl.setController(this);
           try {
               fl.load();            
           } catch (IOException exception) {
               throw new RuntimeException(exception);
           }
  
      }
  </code></pre>
  
  <p>Problem is: after the load of FXML file, all my controller references are null (certainly due to the fact that controllers are in nested panes).</p>
  
  <p>The FXML file tree is here: </p>
  
  <p><a href="https://i.imgur.com/cGJPi9V.png" rel="nofollow noreferrer"><img src="https://i.imgur.com/cGJPi9V.png" alt="file tree"></a></p>
  
  <p>(Entire FXML file: <a href="https://pastedb.io/paste/283be582-8624-4e13-71f8-838d6cbe15a7#fd3bdf271781a16f773b539ca30478f92ef7c8a9b228e7d630ee48c7eaf72a5f" rel="nofollow noreferrer">https://pastedb.io/paste/283be582-8624-4e13-71f8-838d6cbe15a7#fd3bdf271781a16f773b539ca30478f92ef7c8a9b228e7d630ee48c7eaf72a5f</a>)</p>
  
  <p>How can I load all my controllers (except panes) without having to go through each nested container? (Each controller have a unique ID on all the application).</p>