How can I draw image in J2ME

I am using eclipse and I am trying to display image in j2me , but the image isn't display at all.
Moreover, an exception is thrown :
I put the image file in the "res" directory.

My questions are:
What is the problem? Where should I put the image file and  how can I deploy the source file with the image file?

image = Image.createImage("/MyImage.png");
protected void paint(Graphics g){
   g.drawImage(image, 20, 20 , 0);

Open in new window

Who is Participating?
objectsConnect With a Mentor Commented:
Is the res directory in the build path?

GLUZMANSAuthor Commented:
thanks. The res folder wasn't there and I create it.
I put all the png image file into this folder.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.