title: Unable to vertically align horizontal JSeparator in BorderLayout
body: <p>Using BorderLayout I have put two different JButtons, one on the left (west) and one on the right (east), and a horizontal JSeparator in the center. What I want to do is to y-align the separator to the center, instead of to the top as it is now. I have already tried to use the following method on the separator</p>
  
  <pre><code>setAlignmentY(CENTER_ALIGNMENT);
  </code></pre>
  
  <p>but it has absolutely no effect. What am I missing? If it is not possible, is there any other way to do that without using external libraries?</p>
  
  <p>This is what I get:</p>
  
  <p><img src="https://i.stack.imgur.com/SYmCg.png" alt="Image of the problem"></p>
  
  <p>and this is what I want to achieve:</p>
  
  <p><img src="https://i.stack.imgur.com/kG4tx.png" alt="Image of the solution"></p>
  
  <p>This is the sample code that I am using (JPanels on top and bottom were added just for clarity):</p>
  
  <pre><code>import java.awt.BorderLayout;
  import javax.swing.*;
  
  public class SeparatorTest extends JFrame{
  
      JButton btn1 = new JButton("button1");
      JSeparator sep = new JSeparator(SwingConstants.HORIZONTAL);
      JButton btn2 = new JButton("button2");
  
      public SeparatorTest() {
          getContentPane().add(BorderLayout.NORTH, new JPanel());
          getContentPane().add(BorderLayout.WEST, btn1);
          getContentPane().add(BorderLayout.CENTER, sep);
          getContentPane().add(BorderLayout.EAST, btn2);
          getContentPane().add(BorderLayout.SOUTH, new JPanel());
  
          setSize(300, 85);
      }
  
      public static void main(String[] args){
          new SeparatorTest().setVisible(true);
      }
  }
  </code></pre>
  
  <p><strong>EDIT 1: I don't mind the layout as long as it looks the same, I used BorderLayout here due to its simpleness.</strong></p>