I don't know whether i can use Graphics2D in j2me?If I can ,where is it?
anybody can help me?
I don't know whether i can use Graphics2D in j2me?If I can ,where is it?
anybody can help me?
If you want to create a MIDP arcade game or just make graphics, then you must use the Canvas object. Canvas is an abstract class with one abstract method protected abstract void paint(Graphics g), which you need to extend. The parameter gives you a reference to the Graphics object which allows you to put content onto the display.
example shows how we can draw a line.
public void paint(Graphics g)
{
// draw a line
//x = begin x coord
//y = begin y coord
g.drawLine(x, y, xx, yy);
}