title: Java JFrame inner size
body: <p>How can I make the inner size 500x500 pixel?</p>
  <p>Or should I hardcode the 28px macOS top-bar for windows?</p>
  <p>My simple code:</p>
  <pre><code>import javax.swing.JFrame;
  
  public class Hello {
  
      public static void main(String[] args) {
          JFrame frame = new JFrame();
  
          frame.setSize(500, 500);
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          frame.setResizable(false);
  
          frame.setVisible(true);
      }
  }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/7o62Y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7o62Y.png" alt="enter image description here" /></a></p>