
Originally Posted by
sanjeevkate
hi Rahul,
But I am not able to open the document hyperlinked "Display two image at a time".
Thanks.
See this code :
Code:
import javax.microedition.lcdui.*;
public class MyCanvas extends Canvas {
public void paint(Graphics g) {
try {
Image img1=Image.createImage("/src/a.PNG");
Image img2=Image.createImage("/src/b.PNG");
//Display the first image
g.drawImage(img1, 0, 0, Graphics.TOP|Graphics.LEFT);
//Display the second one
g.drawImage(img2, 0, 0, Graphics.TOP|Graphics.LEFT);
}
catch(Exception e) {
}
}
}