📄 displayabletest.java
字号:
//DisplayableTest.java
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class DisplayableTest extends MIDlet
implements CommandListener
{
public DisplayableTest()
{}
public void startApp()
{
Displayable t = new Form("");
t.setTitle("Displayable"); //设定标题
t.setTicker( new Ticker( "滚动文字") );
t.addCommand(new Command("退出命令", Command.SCREEN, 2));
t.setCommandListener(this); //设定事件处理器
Display display = Display.getDisplay(this);
display.setCurrent(t);
}
public void pauseApp()
{ }
public void destroyApp(boolean unconditional)
{ }
public void commandAction(Command c, Displayable s)
{
if (c.getLabel().equals("退出命令") )
{
destroyApp(false);
notifyDestroyed();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -