简体   繁体   English

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

[英]How can I use FormLayout in Java Swing (JGoodies) in IntelliJ

I'm really disappointed about that when I use Swing Java in "IntelliJ" it runs without any problem but when I use JGoodies… FormLayout it doesn't run with me and show error that:我真的很失望,当我在“IntelliJ”中使用 Swing Java 时,它运行没有任何问题,但是当我使用 JGoodies... FormLayout 时,它没有和我一起运行并显示错误:

Exception in thread "main" java.lang.NoClassDefFoundError: com/jgoodies/forms/layout/FormLayout

This is the code:这是代码:

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();
        }
    }

}

and this is the error massage here enter image description here这是这里的错误按摩 在此处输入图像描述

Ok finaly after 2 days searching it show that I must download jgoodies-common-xxxjar and jgoodies-forms-xxxjar and add it to libary好的,经过 2 天的搜索,我必须下载 jgoodies-common-xxxjar 和 jgoodies-forms-xxxjar 并将其添加到库中

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM