title: jList not displaying data from custom model?
body: <p>I'm trying to populate a JList through subclassing the AbstractListModel.I have looked through numerous places to try and find what I was doing wrong, but never managed to resolve the problem.So this class handles my GUI...</p>
  
  <pre><code>//View
  public class central extends javax.swing.JFrame {
  
  public central() {
      initComponents();
      list.addMouseListener(new abstracts.mouseActions(list));
  
  }
  
  public void setListModel(ListModel l ){
      list.setModel(l);
  
  }
  
  // The rest are auto generated code for the interface, not relevant
  </code></pre>
  
  <p>Then is my middle class...</p>
  
  <pre><code> public class MainCtrl {
  //View reference
  private views.central mainFrame = new views.central();
  //Model reference
  private abstracts.ListData model = new abstracts.ListData();
  /*All this was testing purposes and it worked
    private DefaultListModel model = new DefaultListModel();
   */
  
  private void showView(){
      mainFrame.setListModel(model);
      mainFrame.setVisible(true);
      models.contact p2 = new models.contact("Alex", "Christopher","alex@hotmail.com","22","Def");
      models.contact p1 = new models.contact("Joes", "Smith","joey@hotmail.com","33","Def");
      model.addContact(p2);
      model.addContact(p1);
      /* def version
        model.addElement(p2);
  
      */
  
  
  }
  
  public static void main(String[] args) {
      try {
          UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
          new MainCtrl().showView();
      }
      catch (Exception e) {
          e.printStackTrace();
      }
  }
  </code></pre>
  
  <p>Then I have got the AbstractListModel implementation</p>
  
  <pre><code>public class ListData extends AbstractListModel {    
  //Store people info
  private Vector&lt;contact&gt; people; 
  
  public ListData() {
      people = new Vector&lt;contact&gt;();
  }
  
  public void addContact(contact newPerson){
     people.add(newPerson);
     int per = people.indexOf(newPerson);
     fireIntervalAdded(this,0,getSize());
  }
  
  @Override
  public contact getElementAt(int index){
      return  people.get(index);
  }
  
  @Override
  public int getSize(){
      return people.size();
  }
  
  
  @Override
  protected void fireIntervalAdded(Object src, int index, int index2){
   System.out.println(index2);    
  }
  
  .....
  </code></pre>
  
  <p>I tested DefautListModel and it displayed the values, but when I incorporate  a custom model it doesn't display ? Is there a extra step I'm missing ? Also mainCtrl is the main class...</p>
  
  <p>Thanks could really use some help</p>