Your application is extending Frame rather than JFrame. Also you do not need all the WindowListener actions as they will be handled automatically. Just extend JFrame, and add the following line in your constructor:
setDefaultCloseOperation(DISPOSE_ON_CLOSE);