📄 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 + -