EXIT_ON_CLOSE implementation

Replacing AWT Window Listener