I tried a swing program from HeadFirst Java which is as following..
Its written in the book that if we use frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); the program will quit as soon as we close the window(if we leave this out
it will just sit there on the screen forever).
But when i dont use the above line the program closes as well , when i click the close button.
So whats the use of the above code line?