Draw Line in J2me - Source Code
http://img16.imageshack.us/img16/1820/drawline.jpg
كود:
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
/**
* @author A7med Baraka
*/
public class Midlet extends MIDlet {
private Display display;
public void startApp() {
display = Display.getDisplay(this);
display.setCurrent (new DrawingCanvas());
}
public void pauseApp() {
}
public void destroyApp(boolean unconditional) {
}
}
class DrawingCanvas extends Canvas{
public void paint (Graphics g){
g.setColor (255, 255, 255);
g.fillRect (0, 0, getWidth(), getHeight());
g.setColor (0, 0, 0);
g.drawLine (0, 0, 150, 150);
}
}
رد: Draw Line in J2me - Source Code
thanks a lot ya man
Gamed GDN :D