Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Inserting Image in J2ME

 
Amit Bathla
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using Eclipse to develop J2ME application and i am trying to insert image but getting an error java.io.IOException

This is how my code looks like.. I am getting an error in the first line itself.. there must be problem in locating the file... Can i give the absolute path of image.. ??

Image med = Image.createImage("/Elixir.png");
ImageItem Elixir = new ImageItem(null,med,ImageItem.LAYOUT_CENTER,null);
form.append(Elixir);

Can you please suggest where to put image in Eclipse...
 
Amit Bathla
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using Eclipse and here is folder structure

MobileClient
.eclipse.tmp
.settings
bin
deployed
res
src

I tried placing in "res" folder but it seems it is not working...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic