title: JavaFX AnchorPane is not working
body: <p>I'm trying to anchor two rectangles using an <code>AnchorPane</code>, although for some reason this doesn't seem to work: </p>
  
  <p><strong>Normal Screen</strong></p>
  
  <p><img src="https://i.stack.imgur.com/5MnuQ.png" alt="enter image description here"></p>
  
  <p><strong>Maximized Screen</strong></p>
  
  <p><img src="https://i.stack.imgur.com/Mip4z.png" alt="enter image description here"><a href="https://i.stack.imgur.com/Mip4z.png" rel="nofollow noreferrer">2</a>
  This is my code:</p>
  
  <pre><code>public static void main(String[] args) {
          launch(args);
      }
  
      @Override
      public void start(Stage MainStage) throws Exception {
  
          // Setup window
          MainStage.setTitle("Minx IDE - Version 1.0.0");
          Group Root = new Group();
          Scene MainScene = new Scene(Root, 1000, 600, Color.rgb(44, 62, 80));
          MainStage.setScene(MainScene);
          MainStage.show();
  
          // Setup window components
          // Info box
          Rectangle InfoBox = RectangleBuilder.create()
                  .x(700)
                  .y(0)
                  .width(300)
                  .height(600)
                  .fill(Color.rgb(149, 165, 166))
                  .build();
  
          // Save bar
          Rectangle SaveBar = RectangleBuilder.create()
                  .x(0)
                  .y(575)
                  .width(700)
                  .height(25)
                  .fill(Color.rgb(52, 152, 219))
                  .build();
  
          AnchorPane Anchor = new AnchorPane(InfoBox, SaveBar);
          AnchorPane.setBottomAnchor(SaveBar, 0.0);
          AnchorPane.setLeftAnchor(SaveBar, 0.0);
          AnchorPane.setTopAnchor(InfoBox, 0.0);
          AnchorPane.setRightAnchor(InfoBox, 0.0);
  
          // Add components to root and anchor
          Root.getChildren().addAll(InfoBox, SaveBar);
  
      }
  </code></pre>
  
  <p>Please tell me what I'm doing wrong.</p>