Working with JavaFX Choicebox and if statements
<p>Here is the situation: I have a choicebox with 12 items. I would like to know how do I go about implementing the "if" statement, so if clicking the first item some code gets executed and if the second item gets clicked some other code gets executed. Here is what I have done so far:</p>

<pre><code>    //THE DROPDOWN 
    ChoiceBox&lt;String&gt; Choice = new ChoiceBox&lt;&gt;();
    Choice.getItems().addAll("C","Db","D","Eb","E","F","Gb","G","Ab","A","Bb","B");
    Choice.setValue("C");
    //Reacting acording to the selected item 
    Choice.getSelectionModel().selectedItemProperty().addListener((V, oldValue, newValue) -&gt; lbl.setText(newValue)); 
</code></pre>

<p>Right now, whatever item gets clicked will be set to the lbl control </p>

<p>But as said before I'd like to have an if statement implemented ...Thanks for any help!</p>