Adding image to forms

Hello!Im currently working on forms. I added a choicegroup with images.But the form on the emulator doesn't seem to display the images on each choices.My images is on png format.Can you help me on this?Thanks!Ollie
[264 byte] By [tee.peea] at [2007-11-27 3:49:53]
# 1
http://www.java2s.com/Code/Java/J2ME/ChoiceGroupWithImages.htm
suparenoa at 2007-7-12 8:53:48 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 2
Be sure that the names of the images are correct. I dont know if they are case sensitive. Check it on the name and the extension.The images appear only in some option but not in all? or the dont appear in any option?
MelGohana at 2007-7-12 8:53:48 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 3

@MelGohan

Hello!

Thanks for the reply.

I debugged the part when loading images and all the paths of the images i wanted to load were correct.

The emulator didn't displayed the images correctly. And they're in black and white.

My images are 64x64 in size and the'yre colored.

Here is my code:

try{

characters[0] = Image.createImage("/mPackage/res/pics/menu/amazon.png");

characters[1] = Image.createImage("/mPackage/res/pics/menu/fatass.png");

characters[2] = Image.createImage("/mPackage/res/pics/menu/priestess.png");

characters[3] = Image.createImage("/mPackage/res/pics/menu/cyborg.png");

names[0] = "Amazon";

names[1] = "Fatass";

names[2] = "Priestess";

names[3] = "Cyborg";

}catch (Exception ex){

}

cGNewUser_CharacID = new ChoiceGroup("Choose character: ", Choice.EXCLUSIVE, names, characters);

Thanks again!

Message was edited by:

tee.pee

tee.peea at 2007-7-12 8:53:48 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 4
@suparenoThanks for the reply.Thats the code where i patterned mine. But the images didn't display correctly.Are there limitations to the size of the images to be displayed? Say 16x16.Thanks again.Message was edited by: tee.pee
tee.peea at 2007-7-12 8:53:48 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 5

well, on the emulator the images must be on the res folder but the code understand it like the root. so you dont have to put the mPackage/res only the image /pics/menu/amazon.png. and hope this solves yor problem.

ON the emulator you should see the exception of FileNotFound if you catch it.

MelGohana at 2007-7-12 8:53:48 > top of Java-index,Java Mobility Forums,Java ME Technologies...