title: Populate a combobox from an array list populated from an SQL statment
body: <p>I am trying to populate a ComboBox with a list that is populated by a SQL statement. </p>
  
  <p>I tried this:</p>
  
  <pre><code>public void buildData(){        
    ObservableList&lt;ComboBox&gt;  data = FXCollections.observableArrayList();
  
    Connection conn = db.makeConnection();
      try{      
          String SQL = "Select Feature from FeaturesTable Order By Feature";            
          ResultSet rs = conn.createStatement().executeQuery(SQL);  
          while(rs.next()){
              ComboBox cb = new ComboBox();
              cb.featureCombo.set(rs.getString("Feature"));                       
  
              featureCombo.add(cb);                  
          }
          featureCombo.setItems(data);
      }
      catch(Exception e){
            e.printStackTrace();
            System.out.println("Error on Building Data");            
      }
  }
  </code></pre>
  
  <p>I'm getting an error under cb.featureCombo.set of "featureCombo cannot be resolved or is not a field" but featureCombo exists as:</p>
  
  <pre><code>@FXML
  private ObservableList&lt;ComboBox&gt; featureCombo;
  </code></pre>
  
  <p>and then another error under featureCombo.setItems(data); probably because of the same problem.</p>
  
  <p>I'm not set on this method if someone has a better way to do this.</p>