title: how to put an arraylist into a combobox in java?
body: <p>my code </p>
  
  <pre><code> for (Customer cusList1 : cusList) {
              int numAcc = cusList1.getAccNo();
              for (int c = 0; c&lt;cusList.size(); c++) {
                  String arr [] = new String [numAcc];
                  arr[c] = cusList1.getName();
                  DefaultComboBoxModel RefCMB1 = new DefaultComboBoxModel(arr); //Assign Model data to ComboBoxes from Array
                  newNameCombo.setModel(RefCMB1);
              }
      }
  </code></pre>
  
  <p>I have Customer details in an arraylist an i want to put the names onto a combobox.
  cusList is the name of the ArrayList. newNameCombo is the name of the combobox.</p>