Show modal when attempting to close EvA with CMD+Q or via menu.

This commit is contained in:
Fabian Becker 2014-10-24 11:03:23 +02:00
parent cb5bedd263
commit 3cdb25b393

View File

@ -669,7 +669,14 @@ public class Main extends JFrame implements OptimizationStateListener {
@Override
public void actionPerformed(final ActionEvent event) {
Main.this.close();
int result = JOptionPane.showConfirmDialog(
Main.this,
"Do you really want to exit EvA2?",
"Exit Application",
JOptionPane.YES_NO_OPTION);
if (result == JOptionPane.YES_OPTION) {
Main.this.close();
}
}
};