đâ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:
Hiện nay trên thị trường xuất hiện rất nhiều loại thuốc bôi tăng kích thước dương vật được lăng xê là có khả năng làm tăng kích cỡ dương vật của cánh mày râu. Tuy nhiên không phải loại thuốc nào cũng...
Thuốc tăng kích thước chim có tác...