A7med Baraka
03-09-2009, 12:38 AM
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);
}
}
/*
* 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);
}
}