我是.Net開發人員,目前正在遷移到java。我在這裏錯過了什麼?我運行程序時沒有顯示?J2ME在運行應用程序時不顯示
import javax.microedition.lcdui.*;
import javax.microedition.midlet.MIDlet;
import java.util.Date;
import java.util.TimeZone;
public class CalenderMIDlet extends MIDlet{
private Form form = null;
private DateField calender = null;
private static final int DATE = 0;
public CalenderMIDlet(){
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);
}
public void pauseApp(){}
public void destroyApp(boolean destroy){
notifyDestroyed();
}
}
不過它沒有顯示。我試過了。 – Lion 2012-03-14 13:10:12
@Lion不知道你嘗試了什麼,但沒有'setCurrent'什麼也不會顯示,這肯定是 – gnat 2012-03-14 13:25:16
沒有'setCurrent()'沒有顯示什麼是正確的。它只顯示(使用'setCurrent()')'Date In:'。我無法弄清楚。 –
Lion
2012-03-14 13:28:53