title: How can I set the margin of a BorderPane in fxml?
body: <p>I am trying to run this fxml code in javafx:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;BorderPane fx:controller="com.bryantmorrill.chat.main.Controller"
        xmlns:fx="http://javafx.com/fxml" &gt;
  
  &lt;center&gt;
      &lt;ScrollPane BorderPane.margin="25, 25, 25, 25"&gt;
          &lt;content&gt;
              &lt;TextArea fx:id="chatArea" minWidth="200" maxWidth="450"
                        prefWidth="450" minHeight="200" prefHeight="400"
                        maxHeight="400"/&gt;
          &lt;/content&gt;
      &lt;/ScrollPane&gt;
  &lt;/center&gt;
  
  &lt;bottom&gt;
      &lt;FlowPane BorderPane.margin="25, 25, 25, 25"&gt;
          &lt;TextField fx:id="inputArea" minWidth="200" maxWidth="450" prefWidth="450"/&gt;
          &lt;Button text="Send" onAction="#sendMessage" minWidth="200" maxWidth="450" prefWidth="450"/&gt;
      &lt;/FlowPane&gt;
  
  &lt;/bottom&gt;
  </code></pre>
  
  <p></p>
  
  <p>However, it fails when I try to set the margin this way:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;ScrollPane BorderPane.margin="25, 25, 25, 25"&gt;
  </code></pre>
  
  <p>I have also tried these methods:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;ScrollPane BorderPane.margin="25 25 25 25"&gt;
  &lt;ScrollPane BorderPane.margin="25"&gt;
  </code></pre>
  
  <p>This is the exception I get with all of them: </p>
  
  <pre><code>java.lang.IllegalArgumentException: Unable to coerce 25, 25, 25, 25 to class javafx.geometry.Insets.
  </code></pre>
  
  <p>This is my first time using JavaFX and I couldn't find any good examples of this. Thanks for any help!</p>