?? gamescreen.java
字號:
package lckz;
import javax.microedition.lcdui.Canvas;
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.Graphics;
public class GameScreen extends Canvas implements CommandListener {
private static Displayable instance;
synchronized public static Displayable getInstance()
{
if(instance==null)
{
instance=new GameScreen();
}
return instance;
}
private GameScreen()
{
addCommand(new Command("輔助說明",Command.HELP,1));
addCommand(new Command("返回",Command.BACK,1));
setCommandListener(this);
}
public void paint(Graphics g) {
// TODO 自動生成方法存根
g.setColor(0x00737373);
g.fillRect(0,0,getWidth(),getHeight());
g.setColor(0,0,0);
g.drawRect(10,10,60,60);
}
public void commandAction(Command c, Displayable d) {
// TODO 自動生成方法存根
Navigator.flow(c.getLabel());
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -