title: Why does my application still run after closing main window?
body: <p>If I make a JFrame like this</p>
  
  <pre><code>public static void main(String[] args) {
  
       new JFrame().setVisible(true);
  }
  </code></pre>
  
  <p>then after closing the window the appication doesn't stop (I need to kill it).</p>
  
  <p>What is the proper way of showing application's main windows ?</p>
  
  <p>I'd also like to know a reason of a proposed solution.</p>
  
  <p>Thanks in advance.</p>