title: JComboBox set selected item not working properly
body: <p>I'm trying to populate my JComboBox with the following items:</p>
  
  <pre><code>public class DropDownItem {
  
  private String text;
  private int id;
  
  public void setText(String text) {
      this.text = text;
  }
  
  public void setId(int id) {
      this.id = id;
  }
  
  public String toString() {
      return text;
  }
  
  public int getId() {
      return id;
  }
  
  
  public boolean equals(Object i) {
      System.out.println("i is: " + i);
  
      if(i instanceof Integer) {
          if((Integer)i == (Integer)id) {
          System.out.println("It's me!");
          return true;
          }
          else {
              System.out.println("I was asked if I was " + (Integer)i + " but I'm " + id + " as I'm " + text);
              return super.equals(i);
          }
      }
      else return super.equals(i);
  }
  </code></pre>
  
  <p>}</p>
  
  <p>However I'm having trouble using JComboBox's <code>setSelectedItem</code>. I pass <code>setSelectItem</code> an int, and as you can see from above, I've tried to make sure that it gets selected when it's the correct one. The problem I'm having, is that only the currently selected item is checked, which to me is very strange. I verified that by added the print statement, which only gets printed out once..</p>
  
  <p>Any ideas?</p>
  
  <p>Thanks</p>