title: JavaFX scaling to Full screen
body: <p>I have problem with full screen scaling:
  I wrote a program in Java with Java FX.The GUI is simple but it has a problem with scaling (to full screen).<img src="https://i.stack.imgur.com/TMRjz.png" alt="Program GUI when small"></p>
  
  <p>When I put picture to full screen the middle part of the screen is not scaled to full screen. look at the picture <img src="https://i.stack.imgur.com/rf71U.png" alt="GUI on full screen">
  This second picture is 1920 pixel width. The width is not set up correctly. Until around 1500 pixel width there is some error that prevent to make full 
  screen. </p>
  
  <p>The middle part has AnchorPlane ->BorderPlane (until this is ok)
  Then in the middle of Border plane everything stops in scaling:
  Border Plane Center -> HBox plane -> Border plane - top for file button and middle for TextArea.
  For both max width and max hight are set the max values maxWidth="1.7976931348623157E308" but they are not scaling correctly after some value. </p>
  
  <p>What is here a problem?</p>
  
  <pre><code>&lt;AnchorPane id="AnchorPane" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="700.0" prefWidth="900.0" xmlns:fx="http://javafx.com/fxml" fx:controller="migrationscripts.SampleController"&gt;
    &lt;children&gt;
      &lt;BorderPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"&gt;
        &lt;bottom&gt;
          &lt;TextArea fx:id="help" prefHeight="25.0" promptText="Hints of usage" wrapText="true" /&gt;
        &lt;/bottom&gt;
        &lt;center&gt;
          &lt;HBox maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308"&gt;
            &lt;children&gt;
              &lt;BorderPane&gt;
                &lt;center&gt;
                  &lt;TextArea fx:id="prvi" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" promptText="Inuput file" wrapText="true"&gt;
                    &lt;BorderPane.margin&gt;
                      &lt;Insets top="5.0" fx:id="x3" /&gt;
                    &lt;/BorderPane.margin&gt;
                  &lt;/TextArea&gt;
                &lt;/center&gt;
                &lt;top&gt;
                  &lt;BorderPane&gt;
                    &lt;center&gt;
                      &lt;TextField fx:id="labelFile1" maxWidth="1.7976931348623157E308" /&gt;
                    &lt;/center&gt;
                    &lt;left&gt;
                      &lt;Button fx:id="file1" mnemonicParsing="false" onAction="#chooseFile1" text="File1:"&gt;
                        &lt;BorderPane.margin&gt;
                          &lt;Insets left="5.0" right="5.0" fx:id="x2" /&gt;
                        &lt;/BorderPane.margin&gt;
                      &lt;/Button&gt;
                    &lt;/left&gt;
                  &lt;/BorderPane&gt;
                &lt;/top&gt;
              &lt;/BorderPane&gt;
  </code></pre>