posted 8 years ago
See this code from the Region class.
Hopefully it explains what the NEGATIVE_INFINITY value means in this context => Instruct the control to use the preferred size for a given size constraint, such as minWidth or maxHeight.
FXML isn't really built to be human readable, though it is in most cases, but some of the values such as -Infinity are a little weird to see rather than a more easily understandable constant name such as USE_PREF_SIZE, even though they mean exactly the same thing.
Translating some of the FXML to english:
HBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="555.0"
Means:
Define a HBox of preferred size 555x400 with the maxHeight and maxWidth and minHeight and minWidth all set to the preferred height and width.
So essentially you have defined a container which is 555x400 in size and will always remain that size, as the max/min constraints you set all match the preferred size.