title: Center buttons in a vertical alignment
body: <p>I am currently building a project which include a couple of buttons, and I am trying to vertically align these buttons in the center of the panel. I am also trying to make them the exact same size (like new Dimension(15, 100)).</p>
  
  <p>For the part where I am trying to center the buttons I have tried to use BoxLayout, which works fine until I try to make the buttons the same size.. I have tried to use </p>
  
  <pre><code>myButton.setSize(new Dimension(15, 100))
  myButton.setPreferredSize(new Dimension(15, 100));
  myButton.setMinimumSize(new Dimension(15, 100));
  </code></pre>
  
  <p>and for the BoxLayout part, I am using this code piece</p>
  
  <pre><code>buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.Y_AXIS));
  </code></pre>
  
  <p>which works quite well, but it is the centering/size-specification that wont work for me..</p>