javauis/tsrc/fute/lcdui/Midp_Alert_01/src/AlertTests.java
branchRCL_3
changeset 24 6c158198356e
parent 18 9ac0a0a7da70
equal deleted inserted replaced
23:e5618cc85d74 24:6c158198356e
   154                 Alert errorAlert = new Alert("Cannot open Image", e.toString(), null,
   154                 Alert errorAlert = new Alert("Cannot open Image", e.toString(), null,
   155                                              AlertType.ERROR);
   155                                              AlertType.ERROR);
   156                 errorAlert.setTimeout(Alert.FOREVER);
   156                 errorAlert.setTimeout(Alert.FOREVER);
   157                 Display.getDisplay(parent).setCurrent(errorAlert);
   157                 Display.getDisplay(parent).setCurrent(errorAlert);
   158             }
   158             }
       
   159             catch (IllegalArgumentException e)
       
   160             {
       
   161                 System.out.println("Exception: " + e.toString());
       
   162                 Alert errorAlert = new Alert("Exception", e.toString(), null,
       
   163                                              AlertType.ERROR);
       
   164                 errorAlert.setTimeout(Alert.FOREVER);
       
   165                 Display.getDisplay(parent).setCurrent(errorAlert);
       
   166             }
   159         }
   167         }
   160         else if (c == cmdExit)
   168         else if (c == cmdExit)
   161         {
   169         {
   162             parent.destroyApp(false);
   170             parent.destroyApp(false);
   163             parent.notifyDestroyed();
   171             parent.notifyDestroyed();