sweep.java

来自「这是j2me的例子,可供初学者学习,里面有源代码,是我写的」· Java 代码 · 共 37 行

JAVA
37
字号
/*
 * Sweep.java
 *
 * Created on 2007年3月28日, 下午12:08
 */

package com.tan.ui;

import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;

/**
 *
 * @author  USER
 * @version
 */
public class Sweep extends MIDlet {
    public void startApp() {
        final SweepCanvas sweeper = new SweepCanvas();
        sweeper.start();
        sweeper.addCommand(new Command("Exit",Command.EXIT,0));
        sweeper.setCommandListener(new CommandListener() {
            public void commandAction(Command command, Displayable displayable) {
                sweeper.stop();
                notifyDestroyed();
            }
        });
        Display.getDisplay(this).setCurrent(sweeper);
    }
    
    public void pauseApp() {
    }
    
    public void destroyApp(boolean unconditional) {
    }
}

⌨️ 快捷键说明

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