Anda di halaman 1dari 5

TUGAS PRAKTIKUM

Membuat Aplikasi Kemahasiswaan

TUGAS PRAKTIKUM Membuat Aplikasi Kemahasiswaan Di susun Oleh: Nama : Munita Nim : 1220305073 Kelas :

Di susun

Oleh:

Nama : Munita Nim : 1220305073 Kelas : N2 Sore Jurusan/Prodi :

TE/TMKJ

Nim : 1220305073 Kelas : N2 Sore Jurusan/Prodi : TE/TMKJ PROGRAM STUDI TEKNIK MULTIMEDIA DAN KOMPUTER

PROGRAM STUDI TEKNIK MULTIMEDIA DAN KOMPUTER JARINGAN JURUSAN TEKNIK ELEKTRO POLITEKNIK NEGERI LHOKSEUMAWE

2013

/*

*

To change this template, choose Tools | Templates

*

and open the template in the editor.

*/

import java.io.IOException;

import javax.microedition.midlet.*;

import javax.microedition.lcdui.*;

/**

* @author windows7

*/

public class KemahasiswaanExample extends MIDlet implements CommandListener {

Display display;

List list;

Form frm=new Form("input data mahasiswa");

TextField nama=new TextField("nama","",38,TextField.ANY);

TextField nim=new TextField("nim","",25,TextField.NUMERIC);

TextField email=new TextField("email","",50,TextField.EMAILADDR);

TextBox Box1=new TextBox("informasi mahasiswa","",255,TextField.ANY);

Command exit=new Command("Close",Command.EXIT,1);

Command pilih=new Command("pilih",Command.OK,1);

Command Ok=new Command("Ok",Command.EXIT,1);

Command back=new Command("Back",Command.EXIT,1);

Ticker tkr=new Ticker("Selamat Datang Di Website Politeknik Negeri Lhokseumawe");

public KemahasiswaanExample() throws IOException{

list=new List("Kemahasiswaan", List.EXCLUSIVE);

list.append("input data mahasiswa", null);

list.append("informasi", null);

list.append("kegiatan", null);

list.append("Contak Us", null);

list.setTicker(tkr);

frm.addCommand(Ok);

frm.append(nama);

frm.append(nim);

frm.append(email);

frm.setTicker(tkr);

Box1.setTicker(tkr);

Box1.addCommand(back);

list.addCommand(pilih);

list.addCommand(exit);

list.setCommandListener(this);

}

public void startApp() {

if(display==null){

display=Display.getDisplay(this);

display.setCurrent(list);

}

}

public void pauseApp() {

}

public void destroyApp(boolean unconditional) {

}

public void commandAction(Command c, Displayable d) {

if(c==exit){

destroyApp(true);

notifyDestroyed();

}

else if(c==pilih){

display.setCurrent(Box1);

display.setCurrent(frm);

}

if(c==Ok){

destroyApp(true);

notifyDestroyed();

display.setCurrent(list);

}

{

}

if(c==back){

destroyApp(true);

notifyDestroyed();

display.setCurrent(list);

}

}

}

} } }
} } }