I am trying to use JBuilder for a wireless project I am doing, and finding it very difficult to figure out where to place my images and access them.
I was going through the midp 2.0 on microjava.com
I am tring to load an image into my Cowboy sprite:
Code:
public class Cowboy extends Sprite {
...
super(Image.createImage("/icons/tumbleweed.png");
I found the package setup confusing so I removed that and here is my dir structure:
--JumpProject
¦--bin
¦--classes
¦ ¦--icons
¦
¦--src
¦--tempclasses
Set up like this it works fine. But since the icons folder is in the classes folder it gets deleted everytime i 'rebuild'. So I tried moving the icons folder into the root and accessing it from createImage("../icons/cowboy.png") - didnt work.
I tried various combinations of moving the files around and changing the path and had no luck.
Is there something I am missing?
It works fine in WTK22.
regards,
ed.
I was going through the midp 2.0 on microjava.com
I am tring to load an image into my Cowboy sprite:
Code:
public class Cowboy extends Sprite {
...
super(Image.createImage("/icons/tumbleweed.png");
I found the package setup confusing so I removed that and here is my dir structure:
--JumpProject
¦--bin
¦--classes
¦ ¦--icons
¦
¦--src
¦--tempclasses
Set up like this it works fine. But since the icons folder is in the classes folder it gets deleted everytime i 'rebuild'. So I tried moving the icons folder into the root and accessing it from createImage("../icons/cowboy.png") - didnt work.
I tried various combinations of moving the files around and changing the path and had no luck.
Is there something I am missing?
It works fine in WTK22.
regards,
ed.