title: How to best position Swing GUIs?
body: <p>In <a href="https://stackoverflow.com/questions/7142609/can-i-get-the-right-jcomponent-size-before-its-shown/7142653#7142653">another thread</a> I stated that I liked to center my GUIs by doing something like this:</p>
  
  <pre><code>JFrame frame = new JFrame("Foo");
  frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  frame.getContentPane().add(new HexagonGrid());
  frame.pack();
  frame.setLocationRelativeTo(null);
  frame.setVisible(true);
  </code></pre>
  
  <p>But Andrew Thompson had a different opinion, to instead call</p>
  
  <pre><code>frame.pack();
  frame.setLocationByPlatform(true);
  </code></pre>
  
  <p>and inquiring minds want to know why?</p>