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

📄 fullscreenmidlet.java.svn-base

📁 example2 众多JAVA实例源码...学习java基础的好帮手
💻 SVN-BASE
字号:
package opusmicro.demos.canvas;

import javax.microedition.lcdui.Canvas;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Graphics;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;
/**
 * How to set canvas display as full screen
 */
public class FullScreenMIDlet extends MIDlet {
	public FullScreenMIDlet() {}
	protected void destroyApp(boolean arg0) throws MIDletStateChangeException {}
	protected void pauseApp() {}
	protected void startApp() throws MIDletStateChangeException {
		Display.getDisplay(this).setCurrent(new FullScreenCanvas());
	}
}
class FullScreenCanvas extends Canvas{
	public FullScreenCanvas(){
		this.setFullScreenMode(true);
	}
	protected void paint(Graphics g) {
		g.setColor(0xeefafa);
		g.fillRect(0, 0, getWidth(), getHeight());
	}
	public int getHeight(){
		  try{
			  if("Nokia6600".compareTo(System.getProperty("microedition.platform").substring(0,9)) == 0)
				  return 208;
			  else
				  return super.getHeight();
		  }
		  catch(Exception e){
			  return super.getHeight();
		  }
		}
	protected final void sizeChanged(int w, int h){
		if(w>getWidth()){
			
		}
	}
}

⌨️ 快捷键说明

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