Contoh Program J2ME (dengan nama project dan MIDlet class: MBankingBisa) MBankingBisa
import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;
public class MBankingBisa
extends MIDlet implements CommandListener {
private Display display;
private LayarUtama utama;
public MBankingBisa(){
display = Display.getDisplay(this);
}
protected void destroyApp(boolean unconditional ) {
exitMIDlet();
}
protected void pauseApp(){
}
protected void startApp() {
LayarUtama utama = new LayarUtama(this,display);
display.setCurrent(utama);
}
public void exitMIDlet(){
notifyDestroyed();
}
public void commandAction(Command c, Displayable d){
exitMIDlet();
}
}
0 comments