?
Solved

How can I draw image in J2ME

Posted on 2008-06-16
2
Medium Priority
?
2,147 Views
Last Modified: 2013-11-24
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

0
Comment
Question by:GLUZMANS
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 92

Accepted Solution

by:
objects earned 2000 total points
ID: 21798449
Is the res directory in the build path?

0
 

Author Closing Comment

by:GLUZMANS
ID: 31467624
thanks. The res folder wasn't there and I create it.
I put all the png image file into this folder.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses
Course of the Month15 days, 16 hours left to enroll

741 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question