Calendar in J2ME

Now, kita akan membuat field calendar dalam J2ME, kaya begini nih tampilannya:
Alur Proses

Langsung aja, ini dia sintaksnya,,,:
/*





 * 16 Juni 2009
 */

import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import java.util.Date;
import java.util.TimeZone;

/**
 * @author Dyah Fajar
 */
public class CalendarMidlet extends MIDlet {
    private Form form;
private Display display;
private DateField calender;
private static final int DATE = 0;

    public CalendarMidlet() {
        calender = new DateField("Date In:", DateField.DATE, TimeZone.getTimeZone("GMT"));
    }


    public void startApp() {
        display = Display.getDisplay(this);
Form form = new Form("Calender");
form.append(calender);
display.setCurrent(form);
    }

    public void pauseApp() {
    }

    public void destroyApp(boolean destroy) {
        notifyDestroyed();
    }
}

Komentar

Posting Komentar

Terima kasih sudah membaca....^^