title: JTable not visible in JPanel
body: <p>As I am a beginner with java swing (I'm using netbeans), I am having trouble integrating tables in my gui. 
  I have a tab with a panel with research options in a db, and I want to add beneath this panel the produced table with the research results.
  With swing, i have put a JPanel 'researchPanel' within my tab and what I do is the following:</p>
  
  <pre><code>        table = my_research_function(options);
          table.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
          JScrollPane pane = new JScrollPane(table);
          pane.setViewportView(table);
          //resultsPanel.setLayout(new BorderLayout());  
          resultsPanel.add(pane);
  
          // I'm just using this to ensure i get a table 
          // with correct results - works fine
          JOptionPane.showMessageDialog(null, new JScrollPane(table));
  </code></pre>
  
  <p>As I saw in the produced code by swing, <code>resultsPanel</code> already has a layout. Just in case, i did a <code>resultsPanel.setLayout(new BorderLayout())</code> and <code>resultsPanel.add(pane, BorderLayout.CENTER)</code> and I saw some shades in my panel but still no data.</p>
  
  <p>Furthermore, in the Design tab of netbeans, I've set the panel to Auto-Resize both Vertical and Horizontal as the results table can be quite big. 
  What am I missing?</p>