2

我目前正在为纸牌游戏编写 J2ME 应用程序,该应用程序从菜单屏幕开始,提供选择多种不同纸牌游戏的选项。

这个菜单屏幕是一个表格,我需要知道如何导航到游戏的新表格。

public void commandAction(Command c, Displayable s) {

        if(c.equals(exitComm)){ 
                  }
                else if(c.equals(gameComm))
                {
                 //start the queen game...create instance of QueensForm
                  QueensForm form = new QueensForm(null, "Queens");
                  display.setCurrent(form);
                  System.out.println("pressed play");
                }

就目前而言,应用程序可以编译并运行,但是当单击播放按钮时会发生错误,并且它说问题就在display.setCurrent(form);我不确定的问题上,并想知道是否有人可以帮助我解决这个问题或提出更好的建议在应用程序中浏览表单的方式。

4

0 回答 0