title: JScrollPane and JPanel
body: <p>So, I'm making a kind of text editor, and I need a JScrollPane for vertical navigation.
  But I can't get it to work.</p>
  
  <p>I have read every freaking tutorial on first ten pages of google results, and I can't get it to work.</p>
  
  <p>Lets say I have JFrame (size 1000x800). I want to put a JPanel (1000x2000) in it so that it horizontally alignes with the JFrame. I want to stick a simple scroll bar to the right side of the JPanel so I can get to the rest of it.</p>
  
  <p>I have reduced sizes, I have added JPanel to JScrollBar and vice versa, added one of them to JFrame, both, none, but nothing.</p>
  
  <p>So, at this point, I wouldn't mind a couple of lines of finished code...</p>
  
  <p>EDIT: Fine, here's the code...</p>
  
  <pre><code>mWindow = new JFrame(lang.getString("title"));
  mWindow.setSize(1000, 800);
  mWindow.setLocationRelativeTo(null);
  mWindow.setResizable(false);
  mWindow.setLayout(null);
  mWindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  
  mWindow.setVisible(true);
  
  workspace = new JPanel();
  workspace.setBounds(0,0, 1000, 1203);
  workspace.setBackground(Color.RED);
  
  scroll = new JScrollPane(workspace, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
  scroll.setBounds(0, 20, 600, 600);
  //scroll.setLayout(null);
  mWindow.getContentPane().add(scroll);
  mWindow.repaint();
  mWindow.validate();
  </code></pre>
  
  <p>That shows a part of JPanel (600X600, (JScrollPane size)), and shows scrollbars, but isn't scrollable</p>