📄 checkcolor.java
字号:
/*
* CheckColor.java
*
* Created on 2007年3月15日, 上午10:47
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
/**
*
* @author linjia
*/
import javax.microedition.midlet;
import javax.microedition.lcdui;
public class CheckColor extends MIDlet implements CommandListener {
private Display dispaly;
private Form form;
private Textbox textbox;
private Command exit;
/** Creates a new instance of CheckColor */
public CheckColor() {
display=Display.getDisplay(this);
exit=new Command("Exit",Command.SCREEN,1);
String message=null;
if(display.isColor())
{
message="Color display";
}
else
{
message="No Color display";
}
textbox=new Textbox("Check Color",message,17,0);
textbox.addCommand(exit);
textbox.setCommandListener(this);
}
public void stareApp()
{
display.setCurrent(textbox);
}
public void pauseApp()
{
}
public void destroyApp(boolean unconditonal)
{
}
public void commandAction(Command command,Display displayable)
{
if(command==exit)
{
destroyApp(true);
notifyDestroyrd();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -