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

Trouble including images

 
Sean McGaughey
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone,
I am having lots of difficulty in displaying an image as part of an alert. I have used JBuilder to develop my MIDlet and cannot find any documentation on how to include images in a project. I can get the image to display with the alert when the app is running in the WTK emulator, but when I package it into a jad and jar and load the jar into other emulators/phones the alert is displayed but the image is not. So I presume that my reference in the code to "createImage("/Splash.png")" is where I am going wrong. I have tried to follow the instructions for adding images when using the J2WTK and use a "res" folder but again have had no luck with this. So if anyone could walk me through how to add an image into a JBuilder project and reference it in the code I would be very grateful. Thanks again in advance for your help,
Sean.
 
Michael Yuan
author
Ranch Hand
Posts: 1427
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Include your Splash.png file under the root directory of the JAR file.
 
Sean McGaughey
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Michael for the help with how to reference images from the jar file -stupid mistake on my part.
Cheers again,
Sean.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic