正文  图形图像 > Canvas/Bitmap >

我的J2ME编程练习(5)——Canvas

的/** Canvaslet.java** Created on 2005年4月18日, 下午9:41*/import javax.microedition.midlet.*;...


的/*
 * Canvaslet.java
 *
 * Created on 2005年4月18日, 下午9:41
 */
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
/**
 *
 * @author  Administrator
 * @version
 */
public class Canvaslet extends MIDlet implements CommandListener{
  
   private Display aDisplay;
   private MyCanvas myCanvas;
   private Command okCommand;
   private Command exitCommand;
   private List aList;
   private Font f;
 
   public Canvaslet(){
       okCommand=new Command("OK",Command.OK,1);
       exitCommand=new Command("EXIT",Command.EXIT,1);
       aList=new List("Font",Choice.EXCLUSIVE);
       aList.append("Small",null);
       aList.append("Medium",null);
       aList.append("Large",null);
     
       myCanvas=new MyCanvas();
     
       aList.addCommand(okCommand);
       aList.addCommand(exitCommand);
       aList.setCommandListener(this);
     
   }
  
    public void startApp() {
      
        aDisplay=Display.getDisplay(this);
        aDisplay.setCurrent(aList);
             
    }
  
    public void pauseApp() {