title: Unable to show JTable in JPanel from dynamically retrieved data
body: <p>I haven't been able to show a JTable inside a JPanel from dynamically generated data.  I have even tried adding a layout manager so that I don't end up with a null layout manager and no table.  Here is the code I'm using.</p>
  <pre><code>public void setReferencePanel(ArrayList&lt;Item&gt; items, String refFile) {
      String[] columns = {&quot;first&quot;, &quot;last&quot;};
      String[][] data = {{&quot;Adam&quot;, &quot;Smith&quot;}, {&quot;Jon&quot;, &quot;Bon Jovi&quot;},{&quot;John&quot;, &quot;Doe&quot;}};
      JTable sample = new JTable(data, columns);
      refListingPanel.add(sample);
      refListingPanel.setBorder(BorderFactory.createTitledBorder(&quot;Reference File - &quot; + refFile));
  }
  </code></pre>
  <p>and earlier in the same file.</p>
  <pre><code>private JMenuBar menuBar;
  
  private JPanel testListingPanel;
  private JScrollPane testScroller;
  private JPanel refListingPanel;
  private JScrollPane refScroller;
  
  private static Dimension listingDefault = new Dimension(350, 230);
  private IDiffPresenter presenter;
  private boolean allItems;
  private boolean unChangedItems;
  private boolean changedItems;
  private JTable refTable;
  private JTable testTable;
  
  public MasterFrame (IDiffPresenter presenter) {
      super(&quot;Magic Diff - Under Construction&quot;);
      this.presenter = presenter; 
      menuBar = new JMenuBar();       
      setupFileMenu(presenter);
      setupExportMenu(presenter); 
      setupDisplayChangedMenu();
      setupAboutMenu();
  
      setupReferencePanel();
  
      setupTestPanel();
      getContentPane().setLayout(new GridLayout(1,2));
      setJMenuBar(menuBar);
      this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      this.setSize((int)listingDefault.getWidth() + 10, (int)listingDefault.getHeight() + 60); 
      Dimension DimMax = Toolkit.getDefaultToolkit().getScreenSize();
      this.setMaximumSize(DimMax);
  
      this.setExtendedState(JFrame.MAXIMIZED_BOTH);
      ...
  }
  private void setupReferencePanel() {
      refListingPanel = new JPanel();
      refListingPanel.setLayout(new BorderLayout());
      refListingPanel.setBorder(BorderFactory.createTitledBorder(&quot;Reference File&quot;));
      refScroller = new JScrollPane(refListingPanel);
      getContentPane().add(refScroller);
  }
  </code></pre>
  <p>What am I missing or failing to do?  I have even tried some sample data, what is currently in the code, and I get the same issue.</p>