Rémi Bernard
Rémi Bernard

Reputation: 119

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 :)

Upvotes: 1

Views: 975

Answers (1)

Tim Moore
Tim Moore

Reputation: 9482

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

import net.miginfocom.swing.MigLayout;

Upvotes: 2

Related Questions