title: How to Tell How Many Items are Selected in a CheckComboBox?
body: <p>I am using a CheckComboBox in my JavaFX project, it is part of the ControlsFX library. </p>
  
  <p>Essentially what I am trying to do is see how many Items are checked and then make a certain string. For example if only 1 item is checked I want the string to say "1 Item: " and then list what that item is.If there are more than one item selected I want commas to be separating the multiple selected values. I just don't understand what methods that come with the CheckComboBox would work.</p>
  
  <p>Here's some code I have now:</p>
  
  <pre><code>if (!statusBox.getCheckModel().isEmpty()) {
    if (statusBox.getCheckModel().getItemCount() == 1) {
      System.out.println("An item is picked"+statusBox.getCheckModel().getCheckedItems());
    }
  </code></pre>
  
  <p>So as long as the checkcombobox isn't empty, and if there is only one selected item, it will print that string. But I don't know how to count how many items are selected within the box.</p>
  
  <p>Thanks!</p>