作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我真的很失望,当我在“IntelliJ”中使用 Swing Java 时,它运行没有任何问题,但当我使用 JGoodies...FormLayout 时 它不与我一起运行并显示错误:
Exception in thread "main" java.lang.NoClassDefFoundError: com/jgoodies/forms/layout/FormLayout
这是代码:
import javax.swing.*;
import java.awt.*;
public class Adddata extends JFrame {
private JPanel mainpanlll;
public Adddata(String title ) {
super(title);
try {
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.setContentPane(mainpanlll);;
this.pack();
} catch (Exception e )
{
e.getMessage();
}
}
public static void main(String[] args) {
try {
JFrame frame = new Adddata("HI");
frame.setVisible(true);
} catch (Exception e )
{
e.getMessage();
}
}
}
这是这里的错误消息 enter image description here
最佳答案
好吧,经过两天的搜索,我终于决定下载了jgoodies-common-x.x.x.jar 和 jgoodies-forms-x.x.x.jar并将其添加到库
关于java - 如何在 IntelliJ 中的 Java Swing (JGoodies) 中使用 FormLayout,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61473394/
我是一名优秀的程序员,十分优秀!