I have a ScrollPane inside which a FlowPane resides. When I resize the window by dragging the edges the FlowPane does not grow! It stays in its fixed size. How can I resize the FlowPane when the ScrollPane is expanded by mouse?
I have tried many ways,but no luck! Here is my fxml code in its simplest form:
<ScrollPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/11.0.1">
<content>
<FlowPane prefHeight="411.0" prefWidth="613.0" style="-fx-background-color: green;" />
</content>
</ScrollPane>