title: Changing Panes in JavaFx
body: <p>I've been trying to interchange Panes by setting the visbility status to true or false as shown below, but noyhing's working so far.</p>
  
  <p><strong>My failing approach so far:</strong><br>
  <em>The program starts with the visibility of homeContentDisplay set to true. Clicking on a button sets it to false as the visibility of page2ContentDisplay is changed to to true.</em></p>
  
  <p><strong>The Code:</strong></p>
  
  <pre><code>@FXML
  private Pane homeContentDisplay;
  private Pane page2ContentDisplay;
  
  @FXML
  private void handleButtonActionShow(MouseEvent event) {
      homeContentDisplay.setVisible(false);
      page2ContentDisplay.setVisible(true);
  
      FadeTransition fadeIn = new FadeTransition(
              Duration.millis(3000), homeContentDisplay
              );
  
      fadeIn.setFromValue(0.0);
      fadeIn.setToValue(1.0);
      fadeIn.setCycleCount(1);
      fadeIn.setAutoReverse(false);
  
      fadeIn.play();
  }
  </code></pre>
  
  <ol>
  <li>What am I doing wrong in my Code?</li>
  <li>Is there a better way of going on about this, that is changing Panes?</li>
  </ol>