title: Adding elements to a JList
body: <p>I have an array of objects that contain the name of customers, like this: <code>Customers[]</code></p>
  
  <p>How I can add those elements to an existing JList automatically after I press a button? I have tried something like this:</p>
  
  <pre><code>for (int i=0;i&lt;Customers.length;i++)
  {
      jList1.add(Customers[i].getName());
  }
  </code></pre>
  
  <p>But I always get a mistake. How I can solve that? I am working on NetBeans.
  <strong>The error that appears is "not suitable method found for add(String).</strong> By the way my method getName is returning the name of the customer in a String.</p>