samples/exceptions/src/org/apidesign/exceptions/trycatchredo/SaveActionWithQuery.java
changeset 310 fba31e9504a1
parent 309 1687adb2b7f0
     1.1 --- a/samples/exceptions/src/org/apidesign/exceptions/trycatchredo/SaveActionWithQuery.java	Sun Feb 01 13:38:08 2009 +0100
     1.2 +++ b/samples/exceptions/src/org/apidesign/exceptions/trycatchredo/SaveActionWithQuery.java	Sun Feb 01 16:03:37 2009 +0100
     1.3 @@ -35,7 +35,12 @@
     1.4                  JDialog d = p.createDialog(ex.getLocalizedMessage());
     1.5                  d.setVisible(true);
     1.6                  ex.confirm(p.getValue());
     1.7 -                continue;
     1.8 +                if (
     1.9 +                    !p.getValue().equals(JOptionPane.CANCEL_OPTION) &&
    1.10 +                    !p.getValue().equals(JOptionPane.CLOSED_OPTION)
    1.11 +                ) {
    1.12 +                    continue;
    1.13 +                }
    1.14              } catch (IOException ex) {
    1.15                  JOptionPane.showMessageDialog(null, ex);
    1.16              }