title: How do I add space to a JPanel, so that JScrollPane doesn't sit on top of my components?
body: <p>I have a JScrollPane and when I load my application the bar is sitting on top of one of my buttons.  What I would like to do is add some space to the side of my button so that the scroll bar draws over the space and not my button.</p>
  
  <p>Example code that I tried:</p>
  
  <pre><code>JPanel eButton = new JPanel(new BorderLayout());
  JPanel spaceFiller = new JPanel();
  spaceFiller.setSize(30, 10);
  eButton.add(editButton, BorderLayout.EAST);
  eButton.add(spaceFiller, BorderLayout.WEST);
  </code></pre>
  
  <p>The problem with this code is that it still overwrites my button and no space is added.  What is the best way to make sure that JScrollPane doesn't overlap the components in my JFrame?</p>
  
  <p>Thanks</p>