| Reply | « Previous Thread | Next Thread » |
|
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 |
|
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 |
|
Join Date: Dec 2005
Posts: 1,696
Location: Europe/Poland/Warsaw
Offline
Super Contributor
|
|
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 |
| peterblazejewicz |
| View Public Profile |
| Find all posts by peterblazejewicz |
|
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 |
|
Join Date: Dec 2005
Posts: 1,696
Location: Europe/Poland/Warsaw
Offline
Super Contributor
|
|
|
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: Quote:
regards, peter |
| peterblazejewicz |
| View Public Profile |
| Find all posts by peterblazejewicz |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| About the nokia doc: A MIDlet Example Using the Wireless Messaging API ... | SStefano | Mobile Java Tools & SDKs | 2 | 2008-04-03 20:02 |
| Bluetooth Security: What exactly is an untrusted device? | rahulmcs | Bluetooth Technology | 1 | 2005-12-02 07:26 |
| Authentication for DM Client on Nokia 7610 | jclaudius | OMA DM/DS/CP | 2 | 2004-07-27 14:14 |
| Series 60Series 60 MIDP Concept SDK Beta 0.2 Linux bug? | kauppi | Mobile Java Tools & SDKs | 3 | 2003-04-07 10:05 |
| GDB Remote Target debug on Nokia 3650 | danjh@xetron.com | Symbian Tools & SDKs | 2 | 2003-03-27 16:24 |