简体   繁体   中英

How do you import MigLayout into a Java Swing project?

I have a projet for my classes and I want to improve it a bit by using the external library MigLayout .

So I downloaded the jar file and imported it to my project's classpath.

I tried this to import the class but I don't think it's the right way to go:/:

package views;

import com.miglayout.MigLayout;  // <----

import javax.swing.JFrame;

public class HomeView extends JFrame {

    ...

}

VS Code and Eclipse output: The package com is not accessible

Thanks in advance for your responses:)

According to the API documentation , the correct class to import is:

import net.miginfocom.swing.MigLayout;

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