首页 文章

Codenameone showForm没有被第二种形式识别?

提问于
浏览
1

在我的 StateMachine class 中,我可以使用 showForm("form2",null) 加载第二个表单来加载下一个表单 . 在下一个表单中,我有一个form2类,但如果我尝试在此类中执行showForm,则无法识别该命令 . 那么如何从不同的类中调用表单或者是否所有内容都必须通过StateMachine?

非常感谢 .

1 回答

  • 0

    你可以使用show form2

    Form form2 = new Form();
    form2.show();
    

    并且您可以将Statemachine(stateMachine)的对象传递给Form1然后调用

    stateMachine.showForm("NewForm", null); // NewForm should be created in designer theme.
    

相关问题