title: Integrating JavaFX's fxml file in Swing JFrame
body: <p>I have been searching for integrating JavaFX with Swing JFrame. I found lots of articles but could not find match to what I want. I want to integrate the whole fxml file created with Scene builder into JFrame. For example this is my content of the fxml file I created with Scene builder. </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.image.*?&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="617.0" prefWidth="600.0" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/2.2"&gt;
    &lt;children&gt;
      &lt;ImageView fitHeight="72.25" fitWidth="571.0" layoutX="15.0" layoutY="15.0" pickOnBounds="true" preserveRatio="false"&gt;
        &lt;image&gt;
          &lt;Image url="file:/opt/JavaFXSceneBuilder1.1/app/fxml-128.png" /&gt;
        &lt;/image&gt;
      &lt;/ImageView&gt;
      &lt;Pane layoutX="349.0" layoutY="96.0" prefHeight="109.0" prefWidth="237.0"&gt;
        &lt;children&gt;
          &lt;Label layoutX="14.0" layoutY="14.0" text="Certificate no." /&gt;
          &lt;TextField layoutX="119.0" layoutY="11.0" prefWidth="118.0" /&gt;
          &lt;Label layoutX="14.0" layoutY="58.0" text="Date" /&gt;
          &lt;TextField layoutX="119.0" layoutY="55.0" prefWidth="118.0" /&gt;
        &lt;/children&gt;
      &lt;/Pane&gt;
      &lt;Pane layoutX="14.0" layoutY="96.0" prefHeight="109.0" prefWidth="327.0"&gt;
        &lt;children&gt;
          &lt;Label layoutX="14.0" layoutY="14.0" text="Party Name" /&gt;
          &lt;Label layoutX="17.0" layoutY="55.0" text="Party Address" /&gt;
          &lt;TextField layoutX="118.0" layoutY="14.0" prefWidth="200.0" /&gt;
        &lt;/children&gt;
      &lt;/Pane&gt;
      &lt;TextArea layoutX="132.0" layoutY="151.0" prefHeight="40.0" prefWidth="200.0" wrapText="true" /&gt;
      &lt;TableView layoutX="22.0" layoutY="215.0" prefHeight="200.0" prefWidth="564.0"&gt;
        &lt;columns&gt;
          &lt;TableColumn prefWidth="75.0" text="Sr. No." /&gt;
          &lt;TableColumn maxWidth="5000.0" minWidth="10.0" prefWidth="247.0" text="Particular" /&gt;
          &lt;TableColumn prefWidth="75.0" text="Qty." /&gt;
          &lt;TableColumn prefWidth="75.0" text="Rate" /&gt;
          &lt;TableColumn maxWidth="5000.0" minWidth="10.0" prefWidth="92.0" text="Amount" /&gt;
        &lt;/columns&gt;
      &lt;/TableView&gt;
      &lt;Label layoutX="22.0" layoutY="428.0" prefHeight="152.0" prefWidth="309.9998779296875" text="a." /&gt;
      &lt;Label layoutX="345.0" layoutY="428.0" text="Authorized Signature" /&gt;
    &lt;/children&gt;
  &lt;/AnchorPane&gt;
  </code></pre>
  
  <p>Is there a way to load this fxml code when we load the JFrame so that our JFrame would contain the content of fxml.</p>