Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Closing JFrame(java created Window)
if we craete a window in java then we will write following code snippet
JFrame f = new JFrame("some Name"); , andt then
At last to close the window through default operation i.e if the user of window click on cross(x) box at the to right corner of window then,
Now , [b]My Question [/b]is
How to close this window programatically i.e through some check or condition Likewise if we want to close the whole programe we simply wirte
System.exit(0); and the program terminates automatically i want to terminate the JFrame throgh this Method.
0 · ·