title: In javaFx, Why do we need to call "getChildren()" when we add an element to a window?
body: <p>For example, when we add a new button to a pane, we need to write the following code:</p>
  
  <pre><code> StackPane pane = new StackPane();
   pane.getChildren().add(new Button("OK"));
  </code></pre>
  
  <p>Why do we need to call "getChildren()?" what does it even do? Why can't we say:</p>
  
  <pre><code> StackPane pane = new StackPane();
   pane.add(new Button("OK"));
  </code></pre>
  
  <p>We're adding the button to the pane. We're not adding it to its children,</p>