I'm trying to use Scene Builder to handle the complex GUI I'm working on, and for simplicity I'm trying to set the height and width of the window to half the height of the user's screen.
The problem I am facing is that Scene Builder will not allow me to enter custom values ββin the Pref Width and Pref Height fields, and I will allow me to enter something in the USE_COMPUTED_SIZE line
Looking directly at the FXML file, I found the following:
<AnchorPane id="AnchorPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefWidth="0.0" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/8" fx:controller="sudokusolver.FXMLDocumentController">
But I could not find possible replacement values ββfor "-Infinity" anywhere. I am trying to do something like:
Screen.getPrimary().getVisualBounds().getHeight() / 2;
Any tips or ideas on setting such values?
source share