title: How to Add Item in a JComboBox
body: <p>I have a JComboBox and a class named clsPais:</p>
  
  <pre><code>public class clsPais {
  
  private long id = 0;
  private String nombre = "";
  
      public long getId() {
          return id;
      }
      public void setId(long id) {
          this.id = id;
      }
      public String getNombre() {
          return nombre;
      }
      public void setNombre(String nombre) {
          this.nombre = nombre;
      }
  @Override
      public String toString() {
          return nombre;
      }
  
  }
  </code></pre>
  
  <p>In my JFrame code I put:</p>
  
  <pre><code>clsPais p1 = new clsPais();
  p1.setId(1);
  p1.setNombre("ARGENTINA");
  
  clsPais p2 = new clsPais();
  p2.setId(2);
  p2.setNombre("BRASIL");
  
  cmbPaises.removeAllItems();
  cmbPaises.addItem(p1);
  </code></pre>
  
  <p>Here, i have an error, telling me "incompatible types: clsPais canot be converted to string".
  The addItem from my JComboBox only accept String parameter.
  What can I do?</p>
  
  <p>Thank you</p>