displayable1.java~3~

来自「MIDP不支持小数。 所以画抛物线时只在模拟画了。 本代码就是模拟一个子弹飞行轨」· JAVA~3~ 代码 · 共 49 行

JAVA~3~
49
字号
package paowuxian;

import javax.microedition.lcdui.*;

/**
 * <p>Title: </p>
 * <p>Description: </p>
 * <p>Copyright: Copyright (c) 2005</p>
 * <p>Company: </p>
 * @author not attributable
 * @version 1.0
 */

public class Displayable1 extends Canvas implements CommandListener {

  private Image imgWu=null;
  public Displayable1() {
     imgWu=Image.createImage("/images/paodan.png");


    try {
      jbInit();
    }
    catch(Exception e) {
      e.printStackTrace();
    }
  }

  private void jbInit() throws Exception {
    // Set up this Displayable to listen to command events
    setCommandListener(this);
    // add the Exit command
    addCommand(new Command("Exit", Command.EXIT, 1));
  }

  public void commandAction(Command command, Displayable displayable) {
    /** @todo Add command handling code */
    if (command.getCommandType() == Command.EXIT) {
// stop the MIDlet
      MIDlet1.quitApp();
    }
  }

  protected void paint(Graphics g) {

  }

}

⌨️ 快捷键说明

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