import javax.microedition.midlet.*; import javax.microedition.Lcdui.*; import java.io.

*; public class image extends MIDlet implements CommandListener { private Image image; private Command command; private StringItem stringitem; private Form form; private Display display; public image () { } public void startApp() { Form=newForm("Latihan membuat image"); try { image=Image.createImage("/_ack_2.png"); } catch (IOException e) { return; } form.append(image); stringitem=newStringItem(null,"latihan membuat image"); form.append(stringitem); display=Display.getDisplay(this); display.setCurrent(form); command=newCommand("keluar",Command.EXIT,0); form.addCommand(command); form.setCommandListener(this); } public avoid pauseApp(){ } public void destroyApp(boolean unconditional){ notify Destroyed(); } public void commandAction(Command c, Displayable d) { if(c==command) { destroyApp(true); } } }

Sign up to vote on this title
UsefulNot useful