Move close handling to windowClosed event

This callback is called more reliably than windowClosing when killing
window from outside.

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
Tomas Slusny
2019-01-18 21:20:14 +01:00
parent 6e080949f9
commit b893e97ccf

View File

@@ -215,11 +215,17 @@ public class SwingUtil
} }
if (result == JOptionPane.OK_OPTION) if (result == JOptionPane.OK_OPTION)
{
frame.dispose();
}
}
@Override
public void windowClosed(WindowEvent event)
{ {
callback.run(); callback.run();
System.exit(0); System.exit(0);
} }
}
}); });
} }