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

📄 hexmidlet.java

📁 获取手机支持的midp版本信息
💻 JAVA
字号:
package cnmyth;

import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.TextBox;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;
/**
 * @author cnmyth
 * @version 
 * 2007-7-18 18:30:27
 */
public class HexMidlet extends MIDlet {
	private Display display;
	private Command myCommand;
	

	public HexMidlet() {
		super();
		myCommand = new Command("查询", Command.OK, 1);
	}

	protected void startApp() throws MIDletStateChangeException {
		display = Display.getDisplay(this);
		TextBox t = new TextBox("cnmyth", "您的midp版本为:"+System.getProperty("microedition.profiles"), 256, 0);
		TextBox query = new TextBox("", " ", 300,2);
		
		MyCanvas my=new MyCanvas();
		my.addCommand(myCommand);
		
		display.setCurrent(my);
	}

	protected void pauseApp() {
	}

	protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
	}
	public  String ChangeHex(String str){
		return String.valueOf(Integer.toHexString(Integer.parseInt(str)));
		
	}	
	
	public  String ChangeB(String str){
		return String.valueOf(Integer.toBinaryString(Integer.parseInt(str)));
		
	}	
	
	
	

}

⌨️ 快捷键说明

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