?? ui.java
字號(hào):
/*
* Ui.java
*
* Created on 2 de junio de 2005, 20:52
*/
package telefono;
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class Ui extends MIDlet implements CommandListener {
private Command exitCommand;
private Display display;
private Form screen;
public Ui() {
String[] estados = {"Casado","Soltero","Divorciado","Viudo"};
// Obtenemos el objeto Display del midlet.
display = Display.getDisplay(this);
// Creamos el comando Salir.
exitCommand = new Command("Salir", Command.EXIT,2);
// Creamos la pantalla principal (un formulario)
screen = new Form("Interfaz de usuario");
// Creamos y a馻dimos los elemento que vamos a utilizar
TextField nombre = new TextField("Nombre","",30,TextField.ANY);
DateField fecha_nac = new DateField("Fecha de nacimiento", DateField.DATE);
ChoiceGroup estado = new ChoiceGroup("Estado",List.EXCLUSIVE,estados,null);
screen.append(nombre);
screen.append(fecha_nac);
screen.append(estado);
// A馻dimos el comando Salir e indicamos que clase lo manejar
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -