Use YES_NO option pane

This commit is contained in:
Lucas Alber
2019-02-27 15:44:34 +01:00
parent db1017ddde
commit 96f4aaca58

View File

@@ -52,7 +52,8 @@ public class Main {
frame.addWindowListener(new WindowAdapter(){ frame.addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent e) { public void windowClosing(WindowEvent e) {
if (!finished) { if (!finished) {
if (JOptionPane.showConfirmDialog(frame, "Abort?") == 0) { if (JOptionPane.showConfirmDialog(frame, "Are you sure to abort the operation?",
"Abort?", JOptionPane.YES_NO_OPTION) == 0) {
aborted = true; aborted = true;
if (processingThread != null) { if (processingThread != null) {
try { try {