đây là code cùa mình
lớp newclass
Mã:
import javax.microedition.lcdui.Display;import javax.microedition.midlet.MIDlet;import javax.microedition.midlet.*;import javax.microedition.lcdui.*; public class NewClass extends MIDlet { private Display display; public MyCanvans canvans; public NewClass () { display= Display.getDisplay(this); canvans=new MyCanvans(null); } public void startApp() { display.setCurrent(canvans); } public void pauseApp() { } public void destroyApp(boolean unconditional) { } public void Exit() { destroyApp(true); notifyDestroyed(); } }
đấy là code MyCanvans
Mã:
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 MyCanvans extends Canvas implements CommandListener{private Command exit;private NewClass filledRectangleExample;public MyCanvans(NewClass filledRectangleExample){ this.filledRectangleExample=filledRectangleExample; exit=new Command("Exit",Command.EXIT,1); addCommand(exit); setCommandListener(this);} protected void paint(Graphics g) { //throw new UnsupportedOperationException("Not supported yet."); g.setColor(255,255,255); g.fillRect(0,0,getWidth(),getHeight()); g.setColor(0,0,255); g.fillRect(50,50,60, 40); } public void commandAction(Command c, Displayable d) { // throw new UnsupportedOperationException("Not supported yet."); if(c==exit) { filledRectangleExample.Exit(); } } }
bạn nào biết sửa giúp mình thaks
View more random threads:
Bất chấp những lầm tưởng phổ quát, hồ hết những người có âm đạo đều khó lên đỉnh khi bị kích thích âm đạo. Tuy nhiên, điều đó không có tức thị nó không thể vui được! Việc xâm nhập vào âm đạo bằng...
Quý bà giải tỏa bằng việc kích...