J2ME NetBeans6.9 GameBuilder

时间:2012-11-08 03:14:57

标签: netbeans java-me netbeans-6.9

首先打开GameBuilder,创建精灵,Tiled Layers和一个场景, 现在如何让它出现在模拟器的显示屏上? 我尝试创建一个VisualMIDlet 并插入此代码  public void startApp()抛出MIDletStateChangeException {

  try {
  display = Display.getDisplay(this);
  GameDesign gameCanvas = new GameDesign();
  gameCanvas.start();
  Display.setCurrent(gameCanvas);

}
catch (Exception ex) {
  System.out.println(ex);
}
}

但在线 Display.setCurrent(GameCanvas类); 程序生成错误

  Display.setCurrent(gameCanvas);
method Display.setCurrent(Displayable) is not applicable
  (actual argument GameDesign cannot be converted to Displayable by method invocation conversion)
method Display.setCurrent(Alert,Displayable) is not applicable
  (actual and formal argument lists differ in length)

我该怎么办? 也许这是班上的一个错误? 谢谢

0 个答案:

没有答案