Java中关于aboutBox()的问题 [英] Problem on aboutBox() in java

查看:170
本文介绍了Java中关于aboutBox()的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I'm developing a javadesktop application in Netbeans 6.9 and everything is perfect but...it gives me an error on this :

@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生成的代码...同样,如果您创建一个新的Project-> java-> Destop Application,并且不添加任何内容而将其保留在那里,它总是给我同样的问题. .该怎么办????????????

the real problem is that this is the code generated from netbeans...also if you create a new Project->java->Destop Application and you leave it there without adding nothing,it gives always me the same problem... what to do ????????????

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

netbeans version: 6.9.1 jdk version: 7 O.S : Windows 7 32 bit

推荐答案

您不应使用Netbeans创建GUI,因为它会生成无法读取的代码. Swing -Package非常简单,因此您应该使用它.

You shouldn't create your GUI using Netbeans because it generates unreadable code. The Swing-Package is pretty straight forward, so you should use it.

出现错误:您有mp4AboutBox类吗?其中有什么?

To the Error: Do you have a mp4AboutBox-class and what is in it?

这篇关于Java中关于aboutBox()的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆