Listing Program :
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class B extends MIDlet implements CommandListener {
List l;
Form f;
Alert a;
Ticker t;
Command keluar,kembali;
Display D;
public B(){
keluar = new Command ("Keluar",Command.EXIT,0);
kembali = new Command ("Kembali", Command.BACK,0);
t = new Ticker("Jalan-jalan");
a= new Alert ("Informasi", "Halaman Kosong", null,AlertType.INFO);
f = new Form ("Hai");
f.addCommand(kembali);
l = new List("list", List.IMPLICIT);
try {
Image gambar = Image.createImage("/sunset.jpg");
ImageItem x = new ImageItem ("Album", gambar,Item.LAYOUT_CENTER,"ket");
f.append(x);
l.append("A", gambar);
l.append("B", gambar);
l.append("C", gambar);
l.addCommand(keluar);
} catch (Exception ex){
}
a.setTimeout(Alert.FOREVER);
f.setTicker(t);
l.setTicker(t);
f.setCommandListener(this);
l.setCommandListener(this);
}
public void startApp() {
D = Display.getDisplay(this);
D.setCurrent(l);
}
protected void pauseApp() {
}
protected void destroyApp(boolean unconditional) {
}
public void commandAction(Command C, Displayable arg1) {
if (C==keluar){
destroyApp(true);
notifyDestroyed();
}
if (C==kembali){
D.setCurrent(l);
}
if(C==List.SELECT_COMMAND){
int index=l.getSelectedIndex();
String menu = l.getString(index);
if (menu=="A"){
D.setCurrent(f);
}else{
D.setCurrent(a);
}
}
}
}
By : Cut Iswahyuni
According to Stanford Medical, It is in fact the one and ONLY reason women in this country live 10 years longer and weigh an average of 19 KG lighter than us.
BalasHapus(And by the way, it has NOTHING to do with genetics or some secret exercise and EVERYTHING to do with "HOW" they are eating.)
P.S, I said "HOW", not "WHAT"...
CLICK this link to reveal if this brief questionnaire can help you release your real weight loss possibility