代碼如下:
import Javax.microedition.midlet.*;
import Javax.microedition.lcdui.*;
import Java.util.*;
public class MyImage extends MIDlet
{ private Display display;
private Form show;
public MyImage()
{
display = Display.getDisplay(this);
show = new Form("");
show.append(new StringItem("DATE: " , date));
}
public void startApp() throws MIDletStateChangeException
{
try
{
Image img = Image.createImage("/time.png");
show.append(img);
}
catch(Exception ex){}
display.setCurrent(show);
}
public void pauseApp()
{
}
public void destroyApp(boolean unconditional)
{
}
}