title: JScrollPane scroll bar won't show up?
body: <pre><code>package me.an.ugm;
  
  import java.awt.EventQueue;
  
  import javax.swing.JButton;
  import javax.swing.JComboBox;
  import javax.swing.JFrame;
  import javax.swing.JPanel;
  import javax.swing.JScrollPane;
  import javax.swing.ScrollPaneConstants;
  import javax.swing.UIManager;
  
  public class Application
  {
      private JFrame frame;
  
      public static void main(String[] args)
      {
          EventQueue.invokeLater(new Runnable()
          {
              public void run()
              {
                  try
                  {
                      UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
                      Application window = new Application();
                      window.frame.setVisible(true);
                  } catch (Exception e)
                  {
                      e.printStackTrace();
                  }
              }
  
          });
      }
  
      public Application()
      {
          initialize();
      }
  
      private void initialize()
      {
          frame = new JFrame();
          frame.setTitle(&quot;Application&quot;);
          frame.setBounds(100, 100, 401, 450);
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          frame.getContentPane().setLayout(null);
          //frame.setResizable(false);
          frame.setLocationRelativeTo(null);
  
          JPanel panel = new JPanel();
          panel.setBounds(0, 0, 296, 710);
          panel.setLayout(null);
  
          JScrollPane scrollPane = new JScrollPane(panel, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
          scrollPane.setBounds(0, 0, 296, 399);
          frame.getContentPane().add(scrollPane);
  
          for (int i = 0, j = 10; i &lt; 20; i++, j += 35)
          {
              JButton button1 = new JButton();
              button1.setBounds(10, j, 25, 25);
              panel.add(button1);
  
              JComboBox&lt;String&gt; selectorBox = new JComboBox&lt;&gt;();
              selectorBox.setBounds(40, j, 200, 25);
              panel.add(selectorBox);
  
              JButton button2 = new JButton();
              button2.setBounds(245, j, 25, 25);
              panel.add(button2);
          }
      }
  }
  </code></pre>
  <p>I don't know why the scroll bar won't show up. The JPanel is bigger than the JScrollPane so I thought it should show up. Also when I try using setPreferredSize for the scroll pane instead of setBounds or setSize then just nothing shows up at all. My end goal for the program is to have a button off to the right to add another set of buttons (the ones in the loop), that would be used to select another item. I wanted the program to start with 10 rows of the buttons, but I set it to 20 to test the scroll bar. Is it a problem with there not being a layout or did I mess something up with the scroll pane?</p>