简体   繁体   中英

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:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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