05-23-2012 09:52 AM
I did tried add image to MyAppScreen
public class MyAppScreen extends MainScreen {
}
and a found this code on the BlackBerry developer site
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import java.io.*;
public class DisplayAnImage extends MIDlet
{
private Form mForm;
private Display mDisplay;
private Image pngBackground;
public DisplayAnImage()
{
}
public void destroyApp(boolean flag)
{
}
public void startApp()
{
mDisplay = Display.getDisplay(this);
mForm = new Form("MIDlet Developer Guide: Display an image.");
try
{
pngBackground = Image.createImage("test_image.png");
ImageItem img = new ImageItem("bg",pngBackground,
ImageItem.LAYOUT_EXPAND,"background");
mForm.append(img);
mDisplay.setCurrent(mForm);
}
catch(IOException e)
{
System.out.println(e.getMessage());
}
}
public void pauseApp()
{
}
}QUestion! How i can display image with this code ... Or can you give me other advice for display image?..
Solved! Go to Solution.
05-23-2012 10:17 AM
05-23-2012 10:42 AM
Hi,
what kind of image do you want to add? Something like a logo? or you want to show the whole pic in the screen?
05-23-2012 10:56 AM