title: Populate combo box with array list in Swing
body: <p>I create an GUI with an combo box which I want to populate with <code>ArrayList</code>. I tried with my coding but it doesn't work. </p>
  
  <pre><code>private void jcbSourceActionPerformed(java.awt.event.ActionEvent evt) {                                          
        ArrayList al=new ArrayList();
          al.add("A");
          al.add("B");
          al.add("C");
          al.add("D");
          al.add("E");
  
          jcbSource.setModel(new DefaultComboBoxModel(al.toArray()));
          jcbSource.addItem(al.toString());
      }
  </code></pre>