title: Item in JComboBox instance of an object
body: <p>Hello I have the following code to see if an item in the JComboBox is instance of a class(Persoon).  </p>
  
  <pre><code>    public class ItemChangeListener implements ItemListener {
  
          Persoon selectedPerson;
          RekeningApp app;
          PersoonView view;
  
          public ItemChangeListener(PersoonView view) {
  
              this.view = view;
  
          }
  
          public void itemStateChanged(ItemEvent event) {
              if (event.getStateChange() == ItemEvent.SELECTED) {
                  Object item = event.getItem();
                  System.out.println("Itemchangelistener " + item);
                  // do something with object
                  if(item instanceof Persoon) {
                      System.out.println("Instance");
                      this.selectedPerson = (Persoon) item;
                      view.setOverzicht(this.selectedPerson);
                  } else {
                      this.selectedPerson = null;
                  }
              }
          }
  
      }
  </code></pre>
  
  <p>The output of item is the value of persoon.name variable. so the items in the JComboBox are actually strings. </p>
  
  <p>this is how the JComboBox list is set. </p>
  
  <p><code>personenList.addItem(persoon.getNaam());</code></p>
  
  <p>My question is.. how can I check If this Persoon object excists and is the same as in the JComboBox?</p>