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