title: JavaFx ComboBox valueProperty().addListener(new ChangeListener<String>() progressively repeated
body: <p>I am using ComboBox on JavaFX project. When I use <strong>valueProperty().addListener(new ChangeListener())</strong> 
  it is action repeated progressively with every click</p>
  
  <p>Here is my controller:</p>
  
  <pre><code>public class Controller  {
  
  // some code 
  
  @FXML
  private ComboBox&lt;String&gt; FruitList;
  
  
  int count = 1;
  
  public void comboAction() {
          FruitList.valueProperty().addListener(new ChangeListener&lt;String&gt;() {
              @Override
              public void changed(ObservableValue&lt;? extends String&gt; observable, String oldValue, String newValue) {
                  System.out.println("Selected value : " + newValue);
              }
          });
      //count number of select actions
      System.out.println("Selection number: " + count++);
  
      }
  }
  </code></pre>
  
  <p>My FXML file:</p>
  
  <pre><code>&lt;!--some code--&gt;
  
  &lt;ComboBox fx:id="FruitList" onAction="#comboAction" layoutX="22.0" layoutY="212.0" prefHeight="25.0" prefWidth="234.0" promptText="Choose the current month"&gt;
          &lt;items&gt;
              &lt;FXCollections fx:factory="observableArrayList"&gt;
                  &lt;String fx:value="Apple" /&gt;
                  &lt;String fx:value="Orange" /&gt;
                  &lt;String fx:value="Pear" /&gt;
              &lt;/FXCollections&gt;
          &lt;/items&gt;
  &lt;/ComboBox&gt;
  
  &lt;!--some code--&gt;
  </code></pre>
  
  <p>Output result</p>
  
  <pre><code>Selection number: 1
  
  Selected value : Apple
  
  Selection number: 2
  
  Selected value : Pear
  
  Selected value : Pear
  
  Selection number: 3
  
  Selected value : Orange
  
  Selected value : Orange
  
  Selected value : Orange
  
  Selection number: 4
  
  Selected value : Apple
  
  Selected value : Apple
  
  Selected value : Apple
  
  Selected value : Apple
  
  Selection number: 5 Selected value : Pear
  
  Selected value : Pear
  
  Selected value : Pear
  
  Selected value : Pear
  
  Selected value : Pear
  
  Selected value : Pear
  </code></pre>