[ 1684168 ] Closing the application is not consistent

http://sourceforge.net/tracker/index.php?func=detail&aid=1684168&group_id=176962&atid=879332
This commit is contained in:
teo_sarca 2007-04-28 12:16:18 +00:00
parent 52428e8db1
commit 621737ca52
1 changed files with 16 additions and 1 deletions

View File

@ -67,8 +67,23 @@ public final class AMenu extends CFrame
System.exit(1);
MSession.get (Env.getCtx(), true); // Start Session
// Setting close operation/listner - teo_sarca [ 1684168 ]
setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
addWindowListener(new WindowListener() {
public void windowClosing(WindowEvent e) {
if (!ADialog.ask(0, null, "ExitApplication?"))
return;
dispose();
}
public void windowActivated(WindowEvent e) {}
public void windowClosed(WindowEvent e) {}
public void windowDeactivated(WindowEvent e) {}
public void windowDeiconified(WindowEvent e) {}
public void windowIconified(WindowEvent e) {}
public void windowOpened(WindowEvent e) {}
});
// Preparation
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
wfActivity = new WFActivity(this);
wfPanel = new WFPanel(this);
treePanel = new VTreePanel (m_WindowNo, true, false); // !editable & hasBar