title: NetBeans default Jlist changing it into an arraylist
body: <p>Basically, I have the default creator from the GUI Builder in NetBeans producing this code:</p>
  
  <pre><code>IPAddressList = new javax.swing.JList();
  
  IPAddressList.setModel(new javax.swing.AbstractListModel() {
      String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };
      public int getSize() { return strings.length; }
      public Object getElementAt(int i) { return strings[i]; }
  });
  
  AddressList.setViewportView(IPAddressList);
  </code></pre>
  
  <p>What I want to change this to is to have an ArrayList instead of a vector where I can use the add and remove functions of that ArrayList via buttons.  I'm new to the GUI world and I've been trying a few different ways (I've no idea where to put DefaultListModel to make it work correctly).  Please be as specific as you can in answering this.</p>
  
  <p>All I really need is a Jlist code that I can change this code into that will have an ArrayList that if I say IPAddressList.arraylist.add() it will add something to the ArrayList inside this Jlist and update the Jlist accordingly.  Same thing with removing.  Thanks in Advance!</p>