• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Trouble including images

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author
Posts: 1436
6
Python TypeScript Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Or we might never have existed at all. Freaky. So we should cherish everything. Even this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic