×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Jun 2006
    Posts
    5

    Image not showing up on target device, Nokia 7610

    I am programming an application in J2ME for Nokia 7610. I am trying to append an ImageItem to a form.

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

    The image shows up on the emulator fine. When I install it on the target device (Nokia 7610), the image does not show up.

    I am pretty new to J2ME, so I hope someone would have answer to this question. Thank you!

    Shufei

  2. #2
    Registered User
    Join Date
    Jun 2006
    Posts
    5

    Re: Image not showing up on target device, Nokia 7610

    I figured out what was wrong. The image was too big fo rthe screen. When I replace the image with a smaller image, it shows up. It would be helpful if there was some sort of error that tells me that the image has exceed the display's boundary. However, I think it's the programmer's responsibility to make sure that the image will fit.

    Shufei

  3. #3
    Super Contributor
    Join Date
    Dec 2005
    Location
    Europe/Poland/Warsaw
    Posts
    1,699

    Re: Image not showing up on target device, Nokia 7610

    Hi Shufei,

    I'm newbe too,
    if you would use "altText" string when creating ImageItem isntead setting is to null in your constructor you will see that string on device screen - as to midp specification is exactly for that reason - when image is too big for screen,

    also you can use the same image for various device screen sizes I believe and simply scale it down/up accordingly to current screen width/height:
    http://forum.java.sun.com/thread.jsp...sageID=4053281
    http://www.java-tips.org/java-me-tip...-zoom-out.html

    if you create for MIDP 1.0 then image need to be converted to immutable type - in MIPD 2.0 you can use mutable or immutable for ImageItem,

    regards,
    Peter

  4. #4
    Regular Contributor
    Join Date
    Dec 2005
    Posts
    62

    Re: Image not showing up on target device, Nokia 7610

    hi ,

    u just put " try -catch " for that code for creating and appending the image item and find if any exception is throwing or not.


    regards
    rakesh

  5. #5
    Super Contributor
    Join Date
    Dec 2005
    Location
    Europe/Poland/Warsaw
    Posts
    1,699

    Re: Image not showing up on target device, Nokia 7610

    hi,
    @rakesh
    AFAIK there is no exception for ImageItem constructor for that type of issue,
    only for item layout argument and type of appearence,
    possible issue is decribed in MIPD:
    The altText parameter specifies a string to be displayed in place of the image if the image exceeds the capacity of the display. The altText parameter may be null.
    if we pass null as altText it could happen that we will see nothing,

    regards,
    peter

Similar Threads

  1. Replies: 2
    Last Post: 2008-04-03, 19:02
  2. Bluetooth Security: What exactly is an untrusted device?
    By rahulmcs in forum Bluetooth Technology
    Replies: 1
    Last Post: 2005-12-02, 06:26
  3. Authentication for DM Client on Nokia 7610
    By jclaudius in forum OMA DM/DS/CP
    Replies: 2
    Last Post: 2004-07-27, 13:14
  4. Series 60Series 60 MIDP Concept SDK Beta 0.2 Linux bug?
    By kauppi in forum Mobile Java Tools & SDKs
    Replies: 3
    Last Post: 2003-04-07, 09:05
  5. GDB Remote Target debug on Nokia 3650
    By danjh@xetron.com in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2003-03-27, 15:24

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •