read more...
Monday, March 22, 2010
AlarmMIDlet
public class AlarmMIDlet extends MIDlet implements ItemStateListener, CommandListener {
private Command alarmCommand= new Command("alarm", Command.SCREEN, 1);
private Command resetCommand= new Command("Reset", Command.SCREEN, 1);
private Command exitCommand= new Command("Exit", Command.EXIT, 1);
private Display display;
private DateField alarmTimeSetting;
private Form aForm= new Form("Alarm Setting");
private int dateIndex;
private Date currentTime= new Date();
private Timer aTimer;
private boolean dateOK = false;
public AlarmMIDlet() {
display = Display.getDisplay(this);
alarmTimeSetting = new DateField("", DateField.DATE_TIME);
alarmTimeSetting.setDate(currentTime);
dateIndex = aForm.append(alarmTimeSetting);
aForm.addCommand(alarmCommand);
aForm.addCommand(resetCommand);
aForm.addCommand(exitCommand);
aForm.setCommandListener(this);
aForm.setItemStateListener(this);
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment