Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Access images in a MIDP application

by Retired ‎02-12-2010 04:34 PM - edited ‎09-16-2010 02:55 PM (2,154 Views)



This article applies BlackBerry® wireless devices based on Java™.




If you want a MIDP application to use images, you can include the images in the application COD file. To do so, right-click the project and select Add file to project. Once added, the image must also be added to the JAD file.


Note: The BlackBerry Java Development Environment (JDE) will rebuild an application JAD file each time it is compiled, unless it has been added to the project. In order for JAD file modifications to take effect, the JAD file must be added to the project in the BlackBerry JDE.


Below is an example of a JAD file modification for adding an image called midletdemo_jde.png located in an img sub-folder:



MIDlet-1: MIDlet



The image can be added to a Form using the following line of code:





Users Online
Currently online: 17 members 1,948 guests
Please welcome our newest community members: