as for i understand u want to get current time. for that u dont have to use calender.
use code like this
StringBuffer buf;
buf.append( "Current time is = " );
buf.append( System.currentTimeMillis()
System.out.println(buf.toS
it must work and ur problem is solved now
----------------
Kind Regards,
qasitouch.
Main Topics
Browse All Topics





by: qasitouchPosted on 2007-08-01 at 02:25:48ID: 19607228
try this code, i m sure, your problem will be solved.
*; ;
ance(java. util.TimeZ one.getDef ault());
em).getDat e()); has changed");
listener);
import javax.microedition.midlet.
import javax.microedition.lcdui.*
public class EventEx2 extends MIDlet {
Display display;
public EventEx2() {
display = Display.getDisplay(this);
}
public void destroyApp (boolean unconditional) {
notifyDestroyed();
System.out.println("App destroyed ");
}
public void pauseApp () {
display = null;
System.out.println("App paused.");
}
public void startApp () {
Form form = new Form("Change Date");
ItemStateListener listener = new ItemStateListener() {
java.util.Calendar cal =
java.util.Calendar.getInst
public void itemStateChanged(Item item) {
cal.setTime(((DateField)it
System.out.println("\nDate
}
};
// register for events
form.setItemStateListener(
// get today's date
java.util.Date now = new java.util.Date();
DateField dateItem = new DateField("Today's date:", DateField.DATE);
dateItem.setDate(now);
// add date to the Form screen
form.append(dateItem);
display.setCurrent(form);
}
}
=---------------
Kind Regards,
qasitouch