Link to home
Start Free TrialLog in
Avatar of GLUZMANS
GLUZMANS

asked on

How can I draw image in J2ME

hi,
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 : java.io.IOException.
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?

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

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of GLUZMANS
GLUZMANS

ASKER

thanks. The res folder wasn't there and I create it.
I put all the png image file into this folder.