Error in Image display in WTK

[email protected] Fri, 4 Jul 2008 07:24:28 PDT
Newsgroups gmane.comp.java.sun.kvm
Message-ID <26669440.159021215181517734.JavaMail.tomcat@sdcst12.sjc.collab.net>
Hi all,
I'm using the following code to display an Image on the ME device emulator, but I'm always getting the error alert.

The image is in the "res" directory. I've also tried replacing the name with the complete path.


try{
image=Image.createImage("myLogo.png");
imageItem=new ImageItem(null,image,ImageItem.LAYOUT_NEWLINE_BEFORE|ImageItem.LAYOUT_LEFT|ImageItem.LAYOUT_NEWLINE_AFTER,"My Image");
form.append(imageItem);
}catch(java.io.IOException error){
Alert alert=new Alert("ERROR","Cannot load Image",null,AlertType.ERROR);
alert.setTimeout(Alert.FOREVER);
display.setCurrent(alert);
}
[Message sent by forum member 'plitanium' (plitanium)]

http://forums.java.net/jive/thread.jspa?messageID=284387

===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff KVM-INTEREST".  For general help, send email to
[email protected] and include in the body of the message "help".