[#1177] Add SQL Console module to jOOQ - SQL Console exit menu fixed to match default close operation.
This commit is contained in:
parent
7467f3abfd
commit
deae0488d6
@ -113,7 +113,22 @@ public class SqlConsoleFrame extends JFrame {
|
||||
} catch(Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
System.exit(0);
|
||||
if (e.getID() == WindowEvent.WINDOW_CLOSING) {
|
||||
switch(getDefaultCloseOperation()) {
|
||||
case HIDE_ON_CLOSE:
|
||||
setVisible(false);
|
||||
break;
|
||||
case DISPOSE_ON_CLOSE:
|
||||
dispose();
|
||||
break;
|
||||
case EXIT_ON_CLOSE:
|
||||
System.exit(0);
|
||||
break;
|
||||
case DO_NOTHING_ON_CLOSE:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
fileMenu.add(exitMenuItem);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user