?? exclisttest.java
字號:
//EXCListTest.java
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class EXCListTest extends MIDlet implements CommandListener
{
private Display display;
Command commit ;
public EXCListTest ()
{
display = Display.getDisplay(this);
}
public void startApp()
{
commit = new Command("Commit",Command.SCREEN,1) ;
List l = new List("學歷",Choice.EXCLUSIVE) ;
l.append("大專",null) ;
l.append("本科",null) ;
l.append("碩士",null) ;
l.append("博士",null) ;
l.addCommand(commit) ;
l.setCommandListener(this) ;
display.setCurrent(l) ;
}
public void pauseApp()
{ }
public void destroyApp(boolean unconditional)
{ }
public void commandAction(Command c,Displayable s)
{
if(c == commit)
{
List tmp = (List) s ;
int selected = tmp.getSelectedIndex() ;
System.out.println("Item " + selected + " selected") ;
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -