title: How to populate a list values to a combobox in JavaFx
body: <p>I have a list of values which i want to populate in a combobox in javaFx. this is my combo.xml</p>
  
  <pre><code> &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;ComboBox id="comboId" layoutX="210.0" layoutY="108.0" prefHeight="27.0" prefWidth="102.0" promptText="Select"&gt;
    &lt;items&gt;
         &lt;FXCollections fx:factory="observableArrayList"&gt;
        &lt;String fx:value="Item 1" /&gt;
        &lt;String fx:value="Item 2" /&gt;
        &lt;String fx:value="Item 3" /&gt;
         &lt;/FXCollections&gt;
       &lt;/items&gt;
     &lt;/Com boBox&gt;
    &lt;/children&gt;
    &lt;/AnchorPane&gt;
  </code></pre>
  
  <p>this is my main </p>
  
  <pre><code>public class JavaFXExperiment extends Application {
  @Override
  public void start(Stage stage) throws Exception {
      Parent root = FXMLLoader.load(getClass().getResource("combo.fxml"));
      Scene scene = new Scene(root);
      stage.setScene(scene);
      stage.show();
      final ComboBox comboId = new ComboBox();
      comboId.getItems().addAll(
              "jacob.smith@example.com",
              "isabella.johnson@example.com",
              "ethan.williams@example.com",
              "emma.jones@example.com",
              "michael.brown@example.com");
  }
    public static void main(String[] args) {
      launch(args);
  }
  }
  </code></pre>
  
  <p>This is my xml file and the main class  i want to show those values in the combobox.anyone please help</p>