title: FXML prefHeight and prefWidth vs height and width of scene
body: <p>In my <code>fxml</code> file the root element looks like this:</p>
  
  <pre><code>&lt;SplitPane dividerPositions="0.5" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0" prefWidth="900.0" xmlns="http://javafx.com/javafx/8.0.40" xmlns:fx="http://javafx.com/fxml/1" fx:controller="application.AbweichungenKonfigurationController"&gt;
     ...
  &lt;/SplitPane&gt;
  </code></pre>
  
  <p>And the class that invokes the fxml file looks like that:</p>
  
  <p>Now, the size defined in the fxml file:</p>
  
  <pre><code>prefHeight="600.0" prefWidth="900.0"
  </code></pre>
  
  <p>is overwritten by the scene size:</p>
  
  <pre><code>primaryStage.setScene(new Scene(root, 1000, 800));
  </code></pre>
  
  <p>The window that appears has the size defined in the constructor of the scene!</p>
  
  <p>Is there any opportunity to use the size defined in the fxml file? Or how should I deal with this issue?</p>