title: Javafx resize components when fullscreen
body: <p><strong>Original size screenshot</strong></p>
  
  <p><a href="https://i.stack.imgur.com/ZgWnx.png" rel="noreferrer"><img src="https://i.stack.imgur.com/ZgWnx.png" alt="enter image description here"></a></p>
  
  <p><strong>Fullscreen screenshot</strong></p>
  
  <p><a href="https://i.stack.imgur.com/K94rT.png" rel="noreferrer"><img src="https://i.stack.imgur.com/K94rT.png" alt="enter image description here"></a></p>
  
  <p>When i resize how can i nicely arrange the components. 
  im using FXML for the GUI</p>
  
  <p>FXML CODE </p>
  
  <pre><code>    &lt;AnchorPane id="AnchorPane" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="style.LoginController"&gt;
     &lt;children&gt;
        &lt;Button fx:id="login" layoutX="250.0" layoutY="242.0" mnemonicParsing="false" onAction="#login" prefHeight="32.0" prefWidth="101.0" text="Login" /&gt;
        &lt;ImageView fx:id="img2" fitHeight="32.0" fitWidth="32.0" layoutX="109.0" layoutY="184.0" pickOnBounds="true" preserveRatio="true"&gt;
           &lt;image&gt;
              &lt;Image url="@../../../../../Downloads/Drawing%20(23).png" /&gt;
           &lt;/image&gt;
        &lt;/ImageView&gt;
        &lt;Label fx:id="title" alignment="CENTER" focusTraversable="false" layoutX="166.0" layoutY="48.0" opacity="0.83" prefHeight="42.0" prefWidth="269.0" styleClass="title" text="Label" textAlignment="CENTER" textOverrun="CENTER_ELLIPSIS"&gt;
           &lt;font&gt;
              &lt;Font name="Arial Narrow" size="36.0" /&gt;
           &lt;/font&gt;
        &lt;/Label&gt;
        &lt;TextField fx:id="txtusername" layoutX="159.0" layoutY="126.0" prefHeight="32.0" prefWidth="283.0" promptText="Username" styleClass="fields" /&gt;
        &lt;PasswordField fx:id="txtpassword" layoutX="159.0" layoutY="183.0" prefHeight="32.0" prefWidth="283.0" promptText="Password" styleClass="fields" /&gt;
        &lt;ImageView fx:id="img1" fitHeight="32.0" fitWidth="32.0" layoutX="109.0" layoutY="126.0" pickOnBounds="true" preserveRatio="true"&gt;
           &lt;image&gt;
              &lt;Image url="@../../../../../Downloads/Drawing%20(22).png" /&gt;
           &lt;/image&gt;
        &lt;/ImageView&gt;
        &lt;ProgressIndicator fx:id="progress" layoutX="197.0" layoutY="120.0" minHeight="0.0" minWidth="0.0" prefHeight="128.0" prefWidth="188.0" progress="0.0" styleClass="progressind" /&gt;
     &lt;/children&gt;
  &lt;/AnchorPane&gt;
  </code></pre>