title: Dynamically added JTable not displaying
body: <p>Java Newbie here. I have a JFrame that I added to my netbeans project, and I've added the following method to it, which creates a JTable. Problem is, for some reason when I call this method, the JTable isn't displayed. Any suggestions?</p>
  
  <pre><code>public void showFromVectors(Vector colNames, Vector data) {     
      jt = new javax.swing.JTable(data, colNames);
      sp = new javax.swing.JScrollPane(jt);
      //NB: "this" refers to my class DBGridForm, which extends JFrame
      this.add(sp,java.awt.BorderLayout.CENTER);
      this.setSize(640,480);
  }
  </code></pre>
  
  <p>The method is called in the following context:</p>
  
  <pre><code>DBGridForm gf = new DBGridForm(); //DBGridForm extends JFrame
  DBReader.outMatchesTable(gf);
  gf.setVisible(true);
  </code></pre>
  
  <p>... where DBReader.outMatchesTable() is defined as</p>
  
  <pre><code>static public void outMatchesTable(DBGridForm gf) {
      DBReader ddb = new DBReader();
      ddb.readMatchesTable(null);
      gf.showFromVectors(ddb.lastRsltColNames, ddb.lastRsltData);
  }
  </code></pre>
  
  <p>My guess is I'm overlooking something, either about the swing classes I'm using, or about Java. Any ideas?</p>