title: Why adding an unique ittem to my combo-box it takes too long to add it?
body: <p>I have a weird problem with my combo box... (I use Netbeans 7.1 and Java code) when I add an item <code>cbxUnidad.addItem("TODOS");</code> it takes 1300 ms to add it, so when I open that form (on execution time) it takes more than 4 seconds to open it.
  I know that that specific code takes that long because i have used this to know how much time takes that line:
  <pre><code></p>
  
  <pre><code>long empieza  = 0;
  long duracion = 0;
  empieza  = System.currentTimeMillis();
  cbxUnidad.addItem("TODOS");
  duracion = (System.currentTimeMillis() - empieza);
  System.out.pr
  </code></pre>
  
  <p>intln("Adding the item TODOS last " + duracion + " ms");
  </pre></code></p>
  
  <p>So in that way i get 1.3 seconds (1300 ms) when java execute that sentence... that's kinda weird and very slow... so i wanna know if anyone knows why or how to change the sentence.</p>
  
  <p>Here i Leave the initCode for the combo-box:
  <pre><code></p>
  
  <pre><code>cbxUnidad = new javax.swing.JComboBox();
  cbxUnidad.setMaximumRowCount(25);
  cbxUnidad.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
  cbxUnidad.addItemListener(new java.awt.event.ItemListener() {
      public void itemStateChanged(java.awt.event.ItemEvent evt) {
          cbxUnidadItemStateChanged(evt);
          }
  });
  </code></pre>
  
  <p></pre></code></p>
  
  <p>Thank you a lot :) </p>