Java 代号1,动作事件不起作用-需要解释

Java 代号1,动作事件不起作用-需要解释,java,mobile,user-interface,codenameone,Java,Mobile,User Interface,Codenameone,我正试图在我的地狱世界里发动一场行动。im使用GUI并在其自动创建时: protected void onMain_Button1Action(Component c, ActionEvent event) { // If the resource file changes the names of components this call will break notifying you that you should fix the code super.onMain_But

我正试图在我的地狱世界里发动一场行动。im使用GUI并在其自动创建时:

protected void onMain_Button1Action(Component c, ActionEvent event) {
    // If the resource file changes the names of components this call will break notifying you that you should fix the code
    super.onMain_Button1Action(c,event);    
}
我知道它不会起作用,因为在超类中没有相同类型的空

protected void onMain_Button1Action(Component c, ActionEvent event) {
    // If the resource file changes the names of components this call will break notifying you that you should fix the code
    Dialog.show("Test", "it works", "OK",null);
}

我还是一无所获。我已经找了其他关于如何使用代码名的教程,但我找不到。我不知道作者做了什么。如果有人能给我一句话,我将不胜感激。

您需要将资源文件保存在设计器中,而不是删除对super的调用。如果您使用的是Eclipse,则应在使用F5保存到设计器中后刷新项目