icon and resource files

Hi all,

i'm building a MIDlet for an Palm and i've got problems trying to create the icon file and reading the resource files.

I'm compiling with the ktoolBar. I've got the tree directory for my project inside the "apps" directory from j2me, the source files in the src directory and so on, everything in included in a package so everything is in the package directory, i don't have problems for compiling and running the MIDlet, but the ktoolbar can not create the icon, it is a png file 12x12 b/w in the res directory(without any other subdirectories).

I need too a png file as a resource in my MIDlet and is also stored in the res directory, from my program i try to read it like this:

Image wait = Image.createImage("geduld.png");

but it doesn't find it...

any ideas? is it a problem with the packages?

thanx,

Laura

[895 byte] By [LauraD] at [2007-9-26 13:28:22]
# 1
Refer to the icon name from the package root e.g.Image wait = Image.createImage("/com/LauraD/test/res/geduld.png"); If this does not work, post the error.Don
d1camero at 2007-7-2 13:55:42 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 2
Hi,thanx but it still doesn't work, the error i get in the ktoolbar is:Could not create icon com.sun.midp.midlet.Selector$MIDletInfo@f2should i also copy the res directory inside the package tree?Laura
LauraD at 2007-7-2 13:55:42 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 3
Yes, the icons need to be part of the package.
d1camero at 2007-7-2 13:55:42 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 4

hi,

thanks again, now it's working, i wrote wrong the package path on the settings in the ktoolbar.

Now i see my "beautiful icon" on the phone emulator running the midlet in the ktoolbar, and also it finds the other resource files, but when i convert the jar-jad files to a prc file for the Palm emulator, even that the png files are in the jar file, i dont see the icon in the palm emulator and i think i get an exception or something that i dont see 'cos the program doesn't respond to my pointer events...but i dont think this has something to do...

bye,

Laura

LauraD at 2007-7-2 13:55:42 > top of Java-index,Java Mobility Forums,Java ME Technologies...