title: How do I create a Resize animation for JavaFX stage?
body: <p>I've been trying to make a scaling transition for a JavaFX stage to replaces the current Scene (in this case a login frame) for an application's main window.<br>
  When this happens, since the new scene is bigger, the windows gets re-sized abruptly in a non-elegant manner. </p>
  
  <p>Is there any way to set up a scaling or re-size transition to do this to the stage resizing?</p>
  
  <p>Relevant code:</p>
  
  <pre><code>InputStream is = null;
  try {
      is = getClass().getResourceAsStream("/fxml/principal.fxml");
      Region pagina = (Region) cargadorFXML.load(is);
      cargadorFXML.&lt;ContenedorPrincipal&gt;getController().setEscenario(escenario);
  
      final Scene escena = new Scene(pagina, 900, 650);
  
      escena.setFill(Color.TRANSPARENT);
      escenario.setScene(escena);
      escenario.sizeToScene();
      escenario.centerOnScreen();
      escenario.show();
  } catch (IOException ex) {
      // log "Unable to load the main application driver"
      log.error("No fue posible cargar el controlador principal de la aplicación."); 
      log.catching(ex);
  } finally {
      if (is != null) {
          try {
              is.close();
          } catch (IOException e) {}
      }
  }
  </code></pre>