title: Java/Swing Box Layout with Separator
body: <p>Here is the code:</p>
  
  <pre><code>Box twoPanelBox= new Box(BoxLayout.Y_AXIS);
  twoPanelBox.add(panelA); // red
  twoPanelBox.add(new JSeparator(SwingConstants.HORIZONTAL) );
  twoPanelBox.add(panelB); // black
  </code></pre>
  
  <p>And here is what i get:</p>
  
  <p><img src="https://i.stack.imgur.com/t0qip.png" alt="screenshot of panels"></p>
  
  <p>The red and the black panel are displayed as expected, where the seperater ( green box around) has something like a margin between. </p>
  
  <p>How can a avoid this marging, and eliminate this space (grey area)?
  Thank you</p>