in reply to GUI Exiting

why it is like this

Because that is how it is written

can any one give me the solution please...!

The solution is to write the program to not terminate