Rendering an Image

Hi

This code does not render a black 100*100 square on my screen when executing run. Why not?

import javax.microedition.lcdui.*;

import javax.microedition.lcdui.game.*;

publicclass gCanvasextends GameCanvasimplements Runnable

{

private Graphics g;

private Image board;

public gCanvas ()

{

board = Image.createImage(100, 100);

g = board.getGraphics();

g.setColor(color.black);// = 0x000000

g.fillRect(0, 0, board.getWidth(), board.getHeight());

}

publicvoid run ()

{

paint(g);

}

}

[1155 byte] By [tores2a] at [2007-10-2 4:06:09]
# 1
You'll need to implement the paint method to do that.
deepspacea at 2007-7-15 23:29:02 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 2
Look at the URL below:How to get the size of mobile screen http://www.java-tips.org/content/view/351/39/Paint method is used to draw images on mobile Screen.
Agrawala at 2007-7-15 23:29:02 > top of Java-index,Java Mobility Forums,Java ME Technologies...