title: ComboBox Select Items
body: <p>I am trying to select a quantity to add to cart. For example, the drop down list of combo box consists of 1-10 and Others.. If I want to buy more than 10 products, I select the Others.. from drop down list and a text field will be appeared. This is how I set up my comboBox in javaFX:</p>
  
  <pre><code>&lt;ComboBox fx:id="qtyComboBox" prefHeight="21.0" prefWidth="159.0" style="-fx-background-color:#D2B48C;" GridPane.columnIndex="1" GridPane.rowIndex="4"&gt;
        &lt;items&gt;
          &lt;FXCollections fx:factory="observableArrayList"&gt;
            &lt;String fx:value="" /&gt;
            &lt;String fx:value="1" /&gt;
            &lt;String fx:value="2" /&gt;
            &lt;String fx:value="3" /&gt;
            &lt;String fx:value="4" /&gt;
            &lt;String fx:value="5" /&gt;
            &lt;String fx:value="6" /&gt;
            &lt;String fx:value="7" /&gt;
            &lt;String fx:value="8" /&gt;
            &lt;String fx:value="9" /&gt;
            &lt;String fx:value="10" /&gt;
            &lt;String fx:value="Others.." /&gt;
          &lt;/FXCollections&gt;
        &lt;/items&gt;
      &lt;/ComboBox&gt;
  </code></pre>
  
  <p>And this is how I get the selected item from comboBox:</p>
  
  <pre><code>if(panel.getQtyComboBox().getValue().equals("Others..")){
          panel.getQtyTextField().setVisible(true);
          qty = Integer.parseInt(panel.getQtyTextField().getText());
      }else{
          qty = Integer.parseInt(panel.getQtyComboBox().getValue());
      }
  </code></pre>
  
  <p>However, when I choose 1-10, it can insert into database without any problem. But when I select the Others.., the text field does not appear. I wonder where did I did wrongly. Thanks in advance.</p>