netbeans - java中aboutBox()的问题

标签 netbeans java about-box

我正在 Netbeans 6.9 中开发 javadesktop 应用程序,一切都很完美,但是......它给了我一个错误:

@Action
public void showAboutBox()
{
     if (aboutBox == null) {
        JFrame mainFrame = Mp4App.getApplication().getMainFrame();
        aboutBox = new mp4AboutBox(mainFrame);
        aboutBox.setLocationRelativeTo(mainFrame);
    }
}
/** This method is called from within the constructor to
 * initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is
 * always regenerated by the Form Editor.
 */
@SuppressWarnings("unchecked")

这是错误:

Compiling 1 source file to Q:\Mp3 App\mp4-beta\mp4\build\classes
Q:\Mp3 App\mp4-beta\mp4\src\mp4\Mp4View.java:223: cannot find symbol
symbol  : class mp4AboutBox
location: class mp4.Mp4View
        aboutBox = new mp4AboutBox(mainFrame);

1 error
Q:\Mp3 App\mp4-beta\mp4\nbproject\build-impl.xml:603: 
The following error occurred while executing this line:
Q:\Mp3 App\mp4-beta\mp4\nbproject\build-impl.xml:284: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 8 seconds)

真正的问题是这是从netbeans生成的代码...另外,如果您创建一个新的项目->java->Destop应用程序并且将其留在那里而不添加任何内容,它总是给我同样的问题...该怎么办????????????

netbeans 版本:6.9.1 jdk版本:7 操作系统:Windows 7 32位

最佳答案

您不应该使用 Netbeans 创建 GUI,因为它会生成不可读的代码。 Swing-Package 非常简单,所以您应该使用它。

针对错误:您是否有 mp4AboutBox 类以及其中的内容?

关于netbeans - java中aboutBox()的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6114175/

相关文章:

android - 如何通过单击按钮从大约返回到上一个 Activity ?

objective-c - 在没有 'Edit' 菜单项的 Cocoa 应用程序中是否可以有 'Edit' 功能?

java - HTTPURLConnection.getContent java.io.FileNotFoundException

netbeans - 如何自定义生成的 javadoc stub ?

C++ 嵌入 lua 5.2 对 `luaL_newstate' 的 undefined reference (ubuntu 14.04,Netbeans)

java - 执行 new Mat() 时出现 UnsatisfiedLinkError

java - 如何在读/写过程中保留 xml 文档中的文档类型信息?

java - 如何从 JavaScript 向 servlet 发送请求?

c++ - Visual Studio C++ 如何在我的“关于”框中显示动态消息(即字符串)?

java - NetBeans GUI 设计器窗口在设计和源代码之间切换不显示