If I make a JFrame like this

public static void main(String[] args) {

     new JFrame().setVisible(true);
}

then after closing the window the appication doesn't stop (I need to kill it).

What is the proper way of showing application's main windows ?

I'd also like to know a reason of a proposed solution.

Thanks in advance.

Edit
Report