i have to show image and text in form like GUI object, how this can done using canvas class?
thanks and regards
Arunesh
i have to show image and text in form like GUI object, how this can done using canvas class?
thanks and regards
Arunesh
Maybe you need to override the method paint from a canvas (public void paint(Graphics g)), and use the object graphics for paint it using the method draw from a Graphics object.
like this:
public void paint(Graphics g)
{
Image img=new Image("/image.jpg");
g.drawImage(img, 10, 10, Graphics.HCENTER|Graphics.VCENTER);
}
reference:
http://java.sun.com/javame/reference...dui/Image.html
http://java.sun.com/j2se/1.4.2/docs/.../Graphics.html