📄 main2.java
字号:
import javax.microedition.lcdui.*;
public class Main2 extends Canvas implements CommandListener{
Command cmdok=new Command("ok",Command.OK,1);
Command cmdlogin=new Command("login",Command.OK,1);
public Main2()
{
this.addCommand(this.cmdok);
this.addCommand(this.cmdlogin);
this.setCommandListener(this);
}
protected void paint(Graphics arg0) {
// TODO Auto-generated method stub
}
public void commandAction(Command cmd, Displayable arg1) {
// TODO Auto-generated method stub
if (cmd==this.cmdok)
{
System.out.println("ok");
}
if (cmd==this.cmdlogin)
{
System.out.println("login");
}
}}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -