gpt4 book ai didi

java - 如何在 IntelliJ 中的 Java Swing (JGoodies) 中使用 FormLayout

转载 作者:行者123 更新时间:2023-12-02 08:39:24 26 4
gpt4 key购买 nike

我真的很失望,当我在“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/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com