⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form1.java

📁 一个j2me手机上两个窗体互换的源代码新手身上穿的
💻 JAVA
字号:
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.Form;


public class Form1 extends Form implements CommandListener{

	
	Command exit,next;
	
	public Form1(String title) {
		super(title);
		
		exit=new Command("退出",Command.BACK,1);
		next=new Command("下一页",Command.OK,2);
		
		addCommand(exit);
		addCommand(next);
		
		setCommandListener(this);
	}

	public void commandAction(Command c, Displayable d) {
		if(c.equals(exit))
		{
			FormMIDlet.fm.notifyDestroyed();
		}
		else if(c.equals(next))
		{
			FormMIDlet.fm.showForm2();
		}
		
	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -