I try to load a picture which is in my project folder and in png format !
My routine is :
package firsttest;
import java.io.*;
import javax.microedition.lcdui.*;
public class DisplayableTest extends Canvas {
Image img = null;
/**Construct the displayable*/
public DisplayableTest() {
try {
img = Image.createImage("banner.png"
//image = Image.createImage ("/logo.png"
}
catch (IOException e) {
throw new RuntimeException ("Unable to load Image: "+e);
}
try {
jbInit();
}
catch(Exception e) {
e.printStackTrace();
}
--------
Each time, I got a load error, can you help me ?
Best regards,
Eric

;
Reply With Quote

