正文  图形图像 > Canvas/Bitmap >

我的J2ME编程练习(8)——Canvas3

/* * Canvas3let.java * * Created on 2005年4月20日, 下午3:55 */import javax.microedition.midlet.*;...


/*
 * Canvas3let.java
 *
 * Created on 2005年4月20日, 下午3:55
 */
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
/**
 *
 * @author  Administrator
 * @version
 */
public class Canvas3let extends MIDlet implements CommandListener{
    private Display aDisplay;
  
    private Command okCommand;
    private Command exitCommand;
    private Command backCommand;
  
    private TextBox aTextBox;
  
    private Alert showAlert;
  
    private Image showImage;
  
    private MyCanvas aMyCanvas;
  
    public Canvas3let(){
        exitCommand=new Command("退出",Command.EXIT,1);
        okCommand=new Command("进入",Command.OK,1);
        try{
            showImage=Image.createImage("/sohu.png");
        }
        catch(Exception e){}
      
        showAlert=new Alert("Loading...","载入中……",showImage,AlertType.INFO);
      
      
        aTextBox=new TextBox("KeyPress Test",
                "按下进入键后,即可进入显示界面,可以显示所按按键",
                25,TextField.ANY);