main2.java

来自「日程安排 功能还不完善 似的 还得补充」· Java 代码 · 共 30 行

JAVA
30
字号
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 + =
减小字号Ctrl + -
显示快捷键?