• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

Inserting Image in J2ME

 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...
 
I'm doing laundry! Look how clean this tiny ad is:
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
reply
    Bookmark Topic Watch Topic
  • New Topic