title: Populating JavaFX ComboBox or ChoiceBox from enum
body: <p>Is there a way to populate a JavaFX <code>ComboBox</code> or <code>ChoiceBox</code> with all enumerations of a enum ?</p>
  
  <p>Here is what I tried :</p>
  
  <pre><code>public class Test {
  
      public enum Status {
          ENABLED("enabled"),
          DISABLED("disabled"),
          UNDEFINED("undefined");
  
          private String label;
  
          Status(String label) {
              this.label = label;
          }
  
          public String toString() {
              return label;
          }
      }
  }
  </code></pre>
  
  <p>In a another class, I'm trying to populate a <code>ComboBox</code> :</p>
  
  <pre><code>    ComboBox&lt;Test.Status&gt; cbxStatus = new ComboBox&lt;&gt;();
      cbxStatus.setItems(Test.Status.values());
  </code></pre>
  
  <p>But I get an error : <code>incompatible types: Status[] cannot be converted to ObservableList&lt;Status&gt;</code></p>
  
  <p>I obviously get the same problem with a <code>ChoiceBox</code>.</p>