title: JTable not able to add scroll bars
body: <p>I am having JTable which has records which can't fit into it so I have decided to add scrollbars. However, the scroll bar isn't appearing. What am I doing wrong?</p>
  
  <pre><code>new JScrollPane(table, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, 
  JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
              table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
  
              table.setBounds(10, 73, 850, 850);
  </code></pre>
  
  <p>According to answers I have it like this now:</p>
  
  <pre><code>JScrollPane panel = new JScrollPane(table, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, 
  JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
              table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
  
              panel.setBounds(10, 73, 850, 850);
              contentPane.add(table);
  </code></pre>
  
  <p>Now the table isn't even shown. </p>