⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 resultform.java

📁 手机版的旅游信息系统
💻 JAVA
字号:
package com.wy.ch16;

import javax.microedition.lcdui.*;

public class ResultForm extends MemoryForm implements CommandListener {
    private int orderID;
    private Command QuitCommand;
    private Command BackCommand;
    public ResultForm(Displayable h, int o) {
        super("预定成功", h);
        orderID = o;
        if (orderID == 0) {
            this.append("预定失败,请重试.");
        } else {
            String result = "预定成功,您的预定ID是" + orderID + ",请与公司联系";
            this.append(result);
        }
        QuitCommand = new Command("退出", Command.EXIT, 1);
        BackCommand = new Command("后退", Command.BACK, 2);
        this.addCommand(QuitCommand);
        this.addCommand(BackCommand);
        this.setCommandListener(this);
    }
    
    public void commandAction(Command command, Displayable displayable) {
        if (command == QuitCommand) {
            MainMIDlet.getInstance().notifyDestroyed();
        }
        if (command == BackCommand) {
            Display.getDisplay(MainMIDlet.getInstance()).setCurrent(
                    getDisplayable());
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -