title: How can I add a Node to an HBox inside of a Tab JavaFX?
body: <p>I have a GUI that I've created, and I would like to add a <code>ProgressIndicator</code>when the application is doing something in the background. I've created a <code>Tab</code> in the constructor similar to the following:</p>
  
  <pre><code>public class myGUI {
      Tab myTab;
  
      myGUI() {
          myTab = new Tab("My Tab");
  
          HBox view = new HBox();
          VBox left = new VBox();
          BorderPane right = new BorderPane();
  
          /*A lot of other things are declared that go in left and right*/
  
          view.getChildren().addAll(left, right);
          myTab.setContent(view);
      }
  ...
  </code></pre>
  
  <p>Later on, I have a button press that starts the application doing a background task, and I would like to add a <code>ProgressIndicator</code> to the center of the <code>BorderPane</code>. I tried something like the following:</p>
  
  <pre><code>private void handleMyAction(MouseEvent e) {
      myTab.getContent().getChildren().get(1).setCenter(new ProgressIndicator(-1.0f));
  }
  </code></pre>
  
  <p>I would think that this works, however, <code>getContent</code> returns a <code>Node</code>, and I cannot call <code>getChildren</code> on that <code>Node</code>. How can I access the <code>BorderPane</code> to add another <code>Node</code> without making the <code>BorderPane</code> a field in my class?</p>