title: how to get enabled checkbox values or names or fx:id's in javafx
body: <p>I am new to javaFX and FXML, I have created a fxml with few checkbox's and submit button (both are inside a tab called "test tab").</p>
  
  <p>How do I get only enabled checkbox values and/or text and/or fx:id's and while click on submit button.</p>
  
  <p>below the fxml.</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.collections.*?&gt;
  &lt;?import javafx.scene.control.*?&gt;
  &lt;?import javafx.scene.effect.*?&gt;
  &lt;?import javafx.scene.image.*?&gt;
  &lt;?import javafx.scene.layout.*?&gt;
  &lt;?import javafx.scene.paint.*?&gt;
  &lt;?import javafx.scene.shape.*?&gt;
  &lt;?import javafx.scene.text.*?&gt;
  &lt;?import javafx.scene.web.*?&gt;
  
  &lt;AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8.0.45" xmlns:fx="http://javafx.com/fxml/1" fx:controller="application.MainViewController"&gt;
  &lt;children&gt;
  &lt;TabPane fx:id="tabPane" layoutX="7.0" layoutY="6.0" prefHeight="389.0" prefWidth="589.0" tabClosingPolicy="UNAVAILABLE"&gt;
  &lt;tabs&gt;
  &lt;Tab text="Test tab"&gt;
  &lt;content&gt;
  &lt;AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0"&gt;
  &lt;children&gt;
  &lt;Button fx:id="submit" layoutX="450.0" layoutY="283.0" mnemonicParsing="false" onAction="#dsubmit" text="SUBMIT" /&gt;
  &lt;CheckBox fx:id="dbox1" layoutX="46.0" layoutY="30.0" mnemonicParsing="false" onAction="#someaction" text="First Checkbox" /&gt;
  &lt;CheckBox fx:id="dbox2" layoutX="46.0" layoutY="65.0" mnemonicParsing="false" onAction="#someaction" text="Second Checkbox" /&gt;
  &lt;CheckBox fx:id="dbox3" layoutX="46.0" layoutY="105.0" mnemonicParsing="false" onAction="#someaction" text="Third Checkbox" /&gt;
  &lt;CheckBox fx:id="dbox4" layoutX="46.0" layoutY="140.0" mnemonicParsing="false" onAction="#someaction" text="Fourth Checkbox" /&gt;
  &lt;CheckBox fx:id="dbox5" layoutX="46.0" layoutY="178.0" mnemonicParsing="false" onAction="#someaction" text="Fifth Checkbox" /&gt;
  &lt;CheckBox fx:id="dbox6" layoutX="46.0" layoutY="218.0" mnemonicParsing="false" onAction="#someaction" text="Sixth Checkbox" /&gt;
  &lt;/children&gt;
  &lt;/AnchorPane&gt;
  &lt;/content&gt;
  &lt;/Tab&gt;
  &lt;/tabs&gt;
  &lt;/TabPane&gt;
  &lt;/children&gt;
  &lt;/AnchorPane&gt;
  </code></pre>