title: Get combobox value from database
body: <p>I want to get the <code>ComboBox</code> value from database. I am trying the following code, it not return any error, but not items added to the ComboBox.</p>
  <pre><code>@FXML
  private ComboBox&lt;List&gt; laptopos_combo;
  public void filloscombo() throws SQLException
  {
      String connectionUrl = &quot;jdbc:sqlserver://WIN\\SQLEXPRESS:1433;database=itinventory;&quot; + 
      &quot;user=sa;&quot;+ &quot;password=Varpal@1234;&quot;;
      Connection connect= DriverManager.getConnection(connectionUrl);
      String query = &quot;Select * from operatingsystem&quot;;
      
      PreparedStatement pst = connect.prepareStatement(query);
      // log.conn().prepareStatement(query);
      ResultSet os = pst.executeQuery();
      
      while(os.next())
      {
          ((List&lt;String&gt;) laptopos_combo).add(os.getString(&quot;os&quot;));
      }
  }
  </code></pre>