Package javax.microedition.lcdui

Examples of javax.microedition.lcdui.Alert.addCommand()


      setView(previousView);
  }

  protected void quit() {
    Alert alert = new Alert("${quit}?","${quit.or.restart}?",null, AlertType.CONFIRMATION);
    alert.addCommand(new ActionCommand("${quit}", Command.BACK, 1){
      public Navigation execute(Displayable d) throws Exception {
        midlet.notifyDestroyed();
        return null;
      }           
    });
View Full Code Here


      public Navigation execute(Displayable d) throws Exception {
        midlet.notifyDestroyed();
        return null;
      }           
    });
    alert.addCommand(new ActionCommand("${restart}", Command.OK, 2){
      public Navigation execute(Displayable d) throws Exception {
        start();
        return null;
      }     
    });
View Full Code Here

    ex.printStackTrace();
    Alert alert = new Alert("${error}");
    alert.setString(ex+(ex.getMessage() == null ? "" : ":"+ex.getMessage()));
    alert.setType(AlertType.ERROR);
    alert.setTimeout(Alert.FOREVER);
    alert.addCommand(new ActionCommand("${OK}", Command.OK, 1){
      public Navigation execute(Displayable d) throws Exception {
        back();
        return null;
      }     
    });
View Full Code Here

      public Navigation execute(Displayable d) throws Exception {
        back();
        return null;
      }     
    });
    alert.addCommand(new ActionCommand("${quit}", Command.BACK, 1){
      public Navigation execute(Displayable d) throws Exception {
        midlet.notifyDestroyed();
        return null;
      }           
    });
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.