Home > other >  How do you import MigLayout into a Java Swing project?
How do you import MigLayout into a Java Swing project?

Time:12-20

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

CodePudding user response:

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

import net.miginfocom.swing.MigLayout;
  • Related