title: JavaFx - What is purpose of StringConverter.fromString in ComboBox
body: <p>In the follow snippet, What is purpose of StringConverter.fromString here?
  I thought converted Object should be the one that I selected, and ComboBox should handle this already, so why is it mandatory to provide a converted Object?</p>
  
  <pre><code>public class Person{
        public String firstName;
        public Stirng lastName;
  }
  @FXML ComboBox&lt;Person&gt; peopleComboBox;
  public void setComboBox(){
       // add people to peopleComboBox in here...
       // set object converter
       peopleComboBox.setConverter(new StringConverter&lt;Person&gt;() {
          @Override
          public String toString(Person person) {
              return person.firstName;
          }
  
          @Override
          public Person fromString(String string) {
              return peopleComboBox.getSelectionModel().getSelectedItem();
          }
      });
  }
  </code></pre>