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

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