rendered paste body
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
/**
* @author meta
*/
public class Flasher extends MIDlet {
private Display display;
private FlashCanvas canvas;
public Flasher() {
display = Display.getDisplay(this);
canvas = new FlashCanvas();
}
public void startApp() {
display.setCurrent(canvas);
}
public void pauseApp() {
}
public void destroyApp(boolean unconditional) {
}
public void commandAction(Command cmd, Displayable g) {
}
public void keyPressed(int key) {
System.out.println("anyad: "+key);
}
}
public class FlashCanvas extends Canvas{
protected void paint(Graphics g) {
g.setColor(0x00ffffff);
g.fillRect(0, 0, this.getWidth(), this.getHeight());
}
}