title: how to get values from a fxml using java scene builder
body: <p>I am new in Javafx. I am using Java scene builder to create a form. When I saved it, it creates a fxml file. This is the code of my form..</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;?import java.lang.*?&gt;
  &lt;?import java.util.*?&gt;
  &lt;?import javafx.scene.control.*?&gt;
  &lt;?import javafx.scene.layout.*?&gt;
  &lt;?import javafx.scene.paint.*?&gt;
  
  &lt;AnchorPane id="AnchorPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-    Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0"   xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/2.2"&gt;
  &lt;children&gt;
  &lt;Label layoutX="118.0" layoutY="95.0" prefWidth="82.0" text="Username" /&gt;
  &lt;TextField layoutX="200.0" layoutY="95.0" prefWidth="143.0" /&gt;
  &lt;TextField layoutX="200.0" layoutY="137.0" prefWidth="143.0" /&gt;
  &lt;Label layoutX="118.0" layoutY="143.0" prefWidth="61.0" text="Password" /&gt;
  &lt;Button layoutX="244.0" layoutY="190.0" mnemonicParsing="false" text="submit" /&gt;
  &lt;/children&gt;
  &lt;/AnchorPane&gt;
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/d3TOy.png" alt="enter image description here">
  Now I want to get the values of those fields so I  can put that in database.. please any one help me.</p>