我使用LWUIT J2ME工作,我有一個問題是,使用LWUIT UI庫,我不會破壞J2ME應用程序
當我startApp()
裏面的MIDlet我第一次Display.init(this)
和運行應用程序LWUIT工作好但是當我在MIDlet的利用內幕startApp()
事件的形式,它很好的工作,但這種形式的ActionEvent我稱之爲新的形式和新形式 我把一個命令時,我按下它,它在主MIDlet不動
請幫助我如何知道lwuit使用
import javax.microedition.MIDlet;
import some lwuit UILibrary
public class mainMiddlet extends MIDlet implement ActionListner
{
public mainMiddlet(){
try{
Display.init(this);
//somthing is here
form=new Form();
form.addActionListener(this);
}catch(Exception e){}
}
public void actionperformed(ActionEven ae){
//here i call new form
//in action event of this form
new form().show();
}
//here some middlet default method
}
public class newForm extends Form {
//in this form I am put one command back and when i am pressed it
// I call mainMiddlet but it throw error internal application java.lang.nullpointer
// can I back on mainmiddlet from on form to another form
// my main problem is I am not move on mainmiddlet for exit middlet because destoryall()
// is method of middlet
}
你添加的命令?我不明白你的編碼?這是完整的你的代碼? – bharath 2011-04-04 06:13:01
雅我添加命令我的問題是,當mainMiddlet啓動可以從另一個形式的命令事件上面在我的代碼destory我有mainmiddlet我添加一個命令下一個,當我按下它移動另一個窗體(新窗體),但從那裏我可以不回到mainMiddlet它拋出錯誤java.lang.error.nullpointherException – 2011-04-04 13:39:17