title: Video exceeds window's size - JavaFX and FXML
body: <p>i've a trouble with JavaFX and FXML.
  I've a simple FXML file structured in this way: </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
  &lt;?import javafx.scene.control.Button?&gt;
  &lt;?import javafx.scene.control.SplitPane?&gt;
  &lt;?import javafx.scene.control.ToolBar?&gt;
  &lt;?import javafx.scene.layout.AnchorPane?&gt;
  &lt;?import javafx.scene.layout.BorderPane?&gt;
  &lt;?import javafx.scene.media.MediaView?&gt;
  
  &lt;BorderPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="480.0" minWidth="720.0" xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1" fx:controller="mediaplayer.MediaPlayerControllerSplit"&gt;
     &lt;center&gt;
        &lt;SplitPane dividerPositions="0.5" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" BorderPane.alignment="CENTER"&gt;
          &lt;items&gt;
            &lt;AnchorPane fx:id="mediaPaneL" style="-fx-background-color: green;"&gt;
                 &lt;children&gt;
                    &lt;MediaView fx:id="mediaViewL" /&gt;
                 &lt;/children&gt;
              &lt;/AnchorPane&gt;
            &lt;AnchorPane fx:id="mediaPaneR" style="-fx-background-color: red;"&gt;
                 &lt;children&gt;
                    &lt;MediaView fx:id="mediaViewR" /&gt;
                 &lt;/children&gt;
              &lt;/AnchorPane&gt;
          &lt;/items&gt;
        &lt;/SplitPane&gt;
     &lt;/center&gt;
     &lt;bottom&gt;
        &lt;ToolBar minHeight="-Infinity" minWidth="-Infinity" style="-fx-background-color: black;" BorderPane.alignment="BOTTOM_CENTER"&gt;
           &lt;items&gt;
              &lt;Button mnemonicParsing="false" onAction="#openVideo" text="Openfile" /&gt;
              &lt;Button mnemonicParsing="false" onAction="#playVideo" text="&amp;gt;" /&gt;
              &lt;Button mnemonicParsing="false" onAction="#pauseVideo" text="||" /&gt;
              &lt;Button mnemonicParsing="false" onAction="#stopVideo" text="stop" /&gt;
              &lt;Button mnemonicParsing="false" text="&amp;lt;&amp;lt;&amp;lt;" /&gt;
              &lt;Button mnemonicParsing="false" text="&amp;lt;&amp;lt;" /&gt;
              &lt;Button mnemonicParsing="false" text="&amp;gt;&amp;gt;" /&gt;
              &lt;Button mnemonicParsing="false" text="&amp;gt;&amp;gt;&amp;gt;" /&gt;
              &lt;Button mnemonicParsing="false" onAction="#exitVideo" text="EXIT" /&gt;
           &lt;/items&gt;
        &lt;/ToolBar&gt;
     &lt;/bottom&gt;
  &lt;/BorderPane&gt;
  </code></pre>
  
  <p>The controller will load 2 videos and show them in the relative 2 AnchorPanes inside the SplitView, as shown in the following image: 
  <a href="https://i.stack.imgur.com/jSeSN.png" rel="nofollow noreferrer">ClickMe</a></p>
  
  <p>The video exceeds from width bounds of the Parent AnchorPane, how can i set them properly?
  Thanks all.</p>