JAR不适用于绝对布局 [英] JAR doesn't work with Absolute Layout
问题描述
我使用NetBeans表单编辑器为我的程序开发了一个swing GUI。我使用了AbsoluteLayout,这样我就可以点击并将组件拖动到我需要它们的任何地方。问题是当我尝试运行我为程序生成的可执行JAR文件时,我收到以下错误:
I have developed a swing GUI for my program using the NetBeans form editor. I used the AbsoluteLayout so that I could click and drag components to wherever I needed them to go on the frame. The problem is that when I try to run the executable JAR file that I made for the program, I get the following error:
java.lang.NoClassDefFoundError:org / netbeans / lib / awtextra / AbsoluteLayout
...线程main中的异常
java.lang.NoClassDefFoundError: org/netbeans/lib/awtextra/AbsoluteLayout ...Exception in thread "main"
所有的GUI代码都是由NetBeans为我编写的所以我不是确定这里的问题是什么。
All of the GUI code was written for me by NetBeans so I'm not sure what the problem is here.
我真的很喜欢使用表单编辑器,因为当我尝试自己硬编码时,让GUI看起来像我想要的那样非常繁琐。该程序需要用于JavaWebStart,因此它必须在一个可工作的可执行JAR文件中。
I really like using the form editor because getting GUI's to look like I want them to is extremely tedious when I try to hard-code it myself. The program needs to be used for JavaWebStart and so it has to be in a working executable JAR file.
我非常感谢任何人提供的任何帮助/提示/信息这个主题。
I would appreciate very much any help/tips/info from anyone on this subject.
非常感谢你的时间。
推荐答案
尝试将AbsoluteLayout jar文件添加为库,并从该库导入 AbsoluteLayout
。您可以从此处获取jar。
Try add the AbsoluteLayout jar file as a library and import the AbsoluteLayout
from that library. You can get the jar from here.
这篇关于JAR不适用于绝对布局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!