how to load an image?
Trying to load an image using the j2me toolkit, but can't seem to get things working. Does anyone know how to do this? (I think the problem I'm having is more to do with the configuration of the app configs, I've looked at the default examples so far but they dont reveal too much)
thanx
rob
[320 byte] By [
rbyrom] at [2007-9-26 11:31:05]

To access the PNG file it must be packaged into the MIDlet suite's JAR file. Otherwise, you download it as a binary using HTTP. If your images are in an "images" directory then your code would look something like this:
Image image = null;
try
{
image = Image.createImage( "/images/foo.png" );
}
catch(IOException e)
{
}
mfali at 2007-7-2 0:46:31 >
