title: Swing: set JFrame content area size
body: <p>I'm trying to make a JFrame with a usable content area of exactly 500x500. If I do this...</p>
  
  <pre><code>public MyFrame() {
      super("Hello, world!");
      setSize(500,500);
  }
  </code></pre>
  
  <p>... I get a window whose full size is 500x500, including the title bar, etc., where I really need a window whose size is something like 504x520 to account for the window border and titlebar. How can I achieve this?</p>