Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Missing something: J2ME ImageCreate

  • 10-04-2008 11:29pm
    #1
    Registered Users, Registered Users 2 Posts: 1,183 ✭✭✭


    Hi folks,

    I'm trying to write an application for my phone with j2me, first time trying.
    Everything is ok except I cannot get one part to work. I just want to display an existing image on screen. There are lots of examples on the net for the code, but they all just reference the pic as being (/whatever.png"). I've put my image in the same file as my jar file, and tested but I am still not getting it to work.
    try {
    
        ImageItem testImage = new ImageItem
          ("Test Image", Image.createImage ("/testImage.png"),
           ImageItem.LAYOUT_CENTER | ImageItem.LAYOUT_NEWLINE_BEFORE
           | ImageItem.LAYOUT_NEWLINE_AFTER, "Test Image");
    
         form.append (testImage);
      }
      catch (IOException e) {
        form.append (new StringItem
          ("Error:", "" + e));
      }
    

    Can anybody cast an eye over this and suggest what might be going wrong? I've been at this for hours now :confused:


Advertisement