?? mainui.java
字號:
/*
* MainUI.java
*
* Created on 2006年9月4日, 下午9:23
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
package com.j2me.networld.connection;
import javax.microedition.lcdui.*;
/**
*
* @author DONGHOME
*/
public class MainUI extends Form
implements CommandListener
{
private NWC_MIDlet midlet = null;
100, TextField.ANY);
private static final Command connectCmd = new Command("Connect", Command.OK, 1);
private static final Command exitCmd = new Command("Exit", Command.EXIT, 0);
/** Creates a new instance of MainUI */
public MainUI(NWC_MIDlet midlet)
{
super("NetWorld Connect");
this.midlet = midlet;
this.append(address);
this.addCommand(connectCmd);
this.addCommand(exitCmd);
this.setCommandListener(this);
}
public void commandAction(Command cmd, Displayable dis)
{
if(cmd == connectCmd)
{
Thread connectThread = new Thread(
new ConnectThread(this.midlet, address.getString()));
connectThread.start();
}
else if(cmd == exitCmd)
{
this.midlet.exitApp();
}
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -