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

📄 doggymidlet.java

📁 7个J2ME例子
💻 JAVA
字号:
/* * Copyright (c) 2000-2001 Sun Microsystems, Inc. All Rights Reserved. */package examples.animation;import javax.microedition.midlet.*;import javax.microedition.lcdui.*;/** * A MIDlet that displays the Doggy animation. * * @author Mark A. Patel - Motorola, Inc. * @author Roger Riggs - Sun Microsystems, Inc. **/public class DoggyMIDlet extends MIDlet implements CommandListener {    Command cmdExit;    /**     * Constructs a new DoggyMIDlet     **/    public DoggyMIDlet() {        cmdExit = new Command("Exit", Command.EXIT, 1);    }        /**     * Starts the app by creating a new Doggy instance and displaying it     **/    protected void startApp() throws MIDletStateChangeException {        Doggy d;        d = new Doggy();        d.addCommand(cmdExit);        d.setCommandListener(this);                Display.getDisplay(this).setCurrent(d);	    }        protected void pauseApp() {    }        protected void destroyApp(boolean unconditional)	throws MIDletStateChangeException {    }        public void commandAction(Command c, Displayable d) {        if (c == cmdExit) {            try {                destroyApp(false);            } catch (Exception e) {}            notifyDestroyed();        }    }}

⌨️ 快捷键说明

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