J2ME中文教程 3 MIDP高级UI 的使用[35]

[入库:2006年2月23日] [更新:2007年3月24日]

本文简介:

        if (c == CMD_EDIT) {

 

            TextInput textInput = new TextInput(data[currentY][currentX], this,

                                                display);

            display.setCurrent(textInput);

        }

    }

}

 

 

import javax.microedition.lcdui.*;

import javax.microedition.midlet.MIDlet;

 

 

public class TextInput extends TextBox implements CommandListener {

 

    private final static Command CMD_OK = new Command("OK", Command.OK,   

                                                        1);       

    private final static Command CMD_CANCEL = new Command("Cancel", Command.CANCEL,

                                                        1);

    

    private Table parent;

    private Display display;

 

    public TextInput(String text, Table parent, Display display) {

        super("Enter Text", text, 50, TextField.ANY);

        this.parent = parent;

        this.display = display;

本文关键:J2ME中文教程 3 MIDP高级UI 的使用
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top