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:
@@ -216,10 +216,16 @@ public class SwingUtil
|
|||||||
|
|
||||||
if (result == JOptionPane.OK_OPTION)
|
if (result == JOptionPane.OK_OPTION)
|
||||||
{
|
{
|
||||||
callback.run();
|
frame.dispose();
|
||||||
System.exit(0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void windowClosed(WindowEvent event)
|
||||||
|
{
|
||||||
|
callback.run();
|
||||||
|
System.exit(0);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user