title: JavaFX: Align Buttons inside ButtonBar (using SceneBuilder or fxml)
body: <p>I have a JavaFX <a href="http://docs.oracle.com/javase/8/javafx/api/javafx/scene/control/ButtonBar.html" rel="noreferrer"><code>ButtonBar</code></a> with two Buttons (created via SceneBuilder).<br><br>
  I want one of the buttons to be left-aligned and the other right-aligned. (see screenshot)</p>
  
  <p><a href="https://i.stack.imgur.com/LTdOZ.png" rel="noreferrer"><img src="https://i.stack.imgur.com/LTdOZ.png" alt="enter image description here"></a></p>
  
  <p>From the docs I already know how I could achieve this inside the java-source-code:</p>
  
  <pre><code>ButtonBar.setButtonData(newButton, ButtonData.LEFT);
  </code></pre>
  
  <h1>BUT</h1>
  
  <p>I want to know how to achieve this WITHOUT having to write this inside my java-files but<br> <strong>how I can achieve this using just SceneBuilder or the corresponding fxml file</strong>.</p>
  
  <p>My .fxml file currently looks like this:</p>
  
  <pre><code>&lt;ButtonBar&gt;
    &lt;buttons&gt;
      &lt;Button text="New" /&gt;
      &lt;Button text="Save" /&gt;
    &lt;/buttons&gt;
  &lt;/ButtonBar&gt;
  </code></pre>
  
  <p>* I'm on Windows
  <br>** <a href="https://stackoverflow.com/questions/24896498/how-to-right-allign-a-button-in-java-fx-toolbar/24905704#24905704">This answer</a> is not what I want, because he is using a ToolBar, but I want to know how to do this with a ButtonBar (and his approach does not work for the ButtonBar)</p>