title: return values from javafx dialog
body: <p>I created a form with javafx that opens a login dialog, after the user enters the login information correctly the dialog closed and the main form loaded some data, what I need is that when the login dialog is closed it would return the user id (which make the login) to the main form, the code of the above case is like that:</p>
  
  <p>The main form</p>
  
  <pre><code> Stage loginDialog = new LoginDialog(stage);
   loginDialog.sizeToScene();
   loginDialog.showAndWait();
  </code></pre>
  
  <p>the login dialog form</p>
  
  <pre><code>/* do the login */
  close();
  /* need to return thew user id to the main form*/
  </code></pre>
  
  <p>Any help please</p>