The setDefaultCloseOperation method
To understand why this is necessary to cause the program to terminate,
- I
recommend that you visit the standard Sun documentatation
- and examine the description
of the method named setDefaultCloseOperation
- in the JFrame
class.