title: JavaFX Scene Builder - Using Variable Values
body: <p>I'm trying to use Scene Builder to handle a complicated GUI I'm working on and for the sake of simplicity I'm trying to fix the window's height and width to half of the user's screen height.</p>
  
  <p>The problem I'm encountering is that Scene Builder won't let me enter custom values into the "Pref Width" and "Pref Height" fields, and will only let me enter something along the lines of "USE_COMPUTED_SIZE"</p>
  
  <p>Looking directly at the FXML file, I found this:</p>
  
  <pre><code>&lt;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"&gt;
  </code></pre>
  
  <p>But I've been unable to find possible replacement values for "-Infinity" anywhere.  I'm trying to do something along the lines of:</p>
  
  <pre><code>Screen.getPrimary().getVisualBounds().getHeight() / 2;
  </code></pre>
  
  <p>Any tips or ideas on how to customize values like this?</p>