J
Jeff
Hey
midp 2.0
J2ME Wireless Toolkit 2.2
JDK 5
I've created a midlet using KToolbar, and placed a .png image in the <midlet
name>\ res folder...
(i haven't done anything else to add the image to the project, I rely on
KToolbar to do the rest when I package the midlet... maybe that is wrong og
me?)
When I run the code below on the emulator, the image is shown and everything
seems to be working... but it doesn't work on my mobile (nokia 6630).... I'm
not sure why but it looks like this test method don't return....
By the way am I using the correct technique for accessing resources in the
<midlet name>\ res folder? (I tryed using " image = Image.createImage
("/test.png");" without success)
I appreciate any tips that can help me solve my problem code below
public void test()
{
display = Display.getDisplay(midlet);
Image image;
try
{
InputStream is = getClass().getResourceAsStream("/test.png");
image = Image.createImage (is);
}
catch (IOException e)
{
throw new RuntimeException ("Unable to load Image: "+e.toString());
}
}
Jeff
midp 2.0
J2ME Wireless Toolkit 2.2
JDK 5
I've created a midlet using KToolbar, and placed a .png image in the <midlet
name>\ res folder...
(i haven't done anything else to add the image to the project, I rely on
KToolbar to do the rest when I package the midlet... maybe that is wrong og
me?)
When I run the code below on the emulator, the image is shown and everything
seems to be working... but it doesn't work on my mobile (nokia 6630).... I'm
not sure why but it looks like this test method don't return....
By the way am I using the correct technique for accessing resources in the
<midlet name>\ res folder? (I tryed using " image = Image.createImage
("/test.png");" without success)
I appreciate any tips that can help me solve my problem code below
public void test()
{
display = Display.getDisplay(midlet);
Image image;
try
{
InputStream is = getClass().getResourceAsStream("/test.png");
image = Image.createImage (is);
}
catch (IOException e)
{
throw new RuntimeException ("Unable to load Image: "+e.toString());
}
}
Jeff