📄 notifydemo.java
字号:
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class notifyDemo extends MIDlet {
private Display display;
public notifyDemo() {
display=Display.getDisplay(this);
}
public void startApp() throws MIDletStateChangeException {
display.setCurrent(new notifyDemoCanvas());
}
public void pauseApp() {
}
public void destroyApp(boolean unconditional) {
}
class notifyDemoCanvas extends Canvas {
int width, height;
int deltaX, deltaY;
int x,y;
public notifyDemoCanvas() {
width = getWidth();
height = getHeight();
}
public void paint(Graphics g) {
System.out.println("this is paint");
System.out.println("canvas is shown?"+isShown());
g.setColor(0xFFFFFF);
g.fillRect(0,0,width,height);
}
protected void showNotify(){
System.out.println("this is showNotify");
System.out.println("canvas is shown?"+isShown());
}
protected void hideNotify(){
System.out.println("this is hideNotify");
System.out.println("canvas is shown?"+isShown());
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -