title: All values not displaying in ComboBox
body: <pre><code>   try {
          Class.forName("com.mysql.jdbc.Driver");
          connect = DriverManager
                  .getConnection("jdbc:mysql://localhost:3306/project?"
                          + "user=root&amp;password=virus");
          statement = connect.createStatement();
  
          preparedStatement = connect
                  .prepareStatement("select subname from subject");
          rs=preparedStatement.executeQuery();
  
          while (rs.next()) {
              subject = rs.getString("subname");
              ObservableList&lt;String&gt; options1 = FXCollections.observableArrayList(subject);
              comboBox1 = new ComboBox(options1);
          }
          } catch (ClassNotFoundException | SQLException e) {
          throw e;
      } finally {
          close2();
      }
  
      comboBox1.setPromptText("Select Subject");
      comboBox1.setPrefSize(280, 30);
  </code></pre>
  
  <p>This is my code to read some multiple values from a table and display it in a ComboBox. Actually there are 3 values to be displayed. The while loop is working fine. Each time it reads each value from the table and place it in the ComboBox. </p>
  
  <p>But when the next value is comes, it overlaps the previous value and as a result only one value is displayed in the ComboBox, that is the last read value. But I need to display all the values in the ComboBox, that is when a new value comes, I need to add it as a new entry, instead of overlapping the previous value.</p>
  
  <p>How can I do it ? </p>