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.