title: JList - loop that adds elements to JList
body: <p>I'm trying to make a loop that adds items to jlist but when I put in actionlistener it doesn't seem to be doing it...</p>
  
  <pre><code>textFieldSearch.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent e) {
              for (int i = 0; i &lt; 10; ++i) {
                  locations[i] = "blah";
              }
          }
      });
  </code></pre>