Kamis, 29 November 2012

PERSISTANCE


package ListMenu;
import javax.microedition.lcdui.*;
import javax.microedition.io.*;
import javax.microedition.rms.*;
import javax.microedition.midlet.*;
import java.io.*;
public class ListMenu extends MIDlet implements CommandListener{
    private Display display;
    private List list;
    private Command cmdKeluar;
    private Command cmdKembali, cmdHasil, cmdbalik, cmdSimpan;
    private TextField soal1, soal2, soal3, soal4, soal5, id;
    private Form form;
    int nilai1, nilai2, nilai3, nilai4, nilai5;
    int Nakhir;
    private RecordStore rs;
    private RecordEnumeration re;
    private Alert alert;
    public ListMenu() {

Selasa, 09 Oktober 2012

ASSIGNMENT 4TH MEETING


/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;


public class Assignment extends MIDlet implements CommandListener {
    Display display;
    Form forms, resultforms;
    Command exitCommand = new Command("Exit", Command.EXIT, 1);
    Command okCommand = new Command("OK", Command.OK, 2);
    Alert alert = new Alert("Error", "Ada yang belum diisi!!pleas isi kabeh!", null, AlertType.ERROR);
    TextField name, address, phonenumber, email;
    ChoiceGroup popup;
    DateField dateonly;
    StringItem result;
  
     

Senin, 01 Oktober 2012

LAB ACTIVITY HIGH LEVEL USER INTERFACE


PERCOBAAN 1 PENGGUNAAN ALERT

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;

/**
 * @author pathek$
 */
public class AlertMidlet extends MIDlet implements CommandListener {
    Display display;
     Form mainForm;
     Command exitCommand = new Command("Exit", Command.EXIT, 0);
     Command okCommand = new Command("Ok", Command.OK, 0);
     Gauge gauge = new Gauge (null, false, 5, 0);
     Command[] commands = {
          new Command("Alarm", Command.OK, 0),
          new Command("Confirmation", Command.OK, 0),
          new Command("Info", Command.OK, 0),
          new Command("Warning", Command.OK, 0),
          new Command("Error", Command.OK, 0),
          new Command("Modal", Command.OK, 0)
     };
    

Rabu, 26 September 2012

LAB ACTIVITY PEMROGRAMAN J2ME

Percobaan 1 : Hello Midlet


import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;

public class HelloMidlet extends MIDlet implements CommandListener {
    Display display;
    Command exitCommand = new Command ("Exit", Command.EXIT,1);
    Alert helloAlert;


    public HelloMidlet() {
            helloAlert  = new Alert("Hello MIDlet", "Hello, world!", null, AlertType.INFO);
            helloAlert.setTimeout(Alert.FOREVER);
            helloAlert.addCommand(exitCommand);
            helloAlert.setCommandListener(this);
    }