How do I import the flatlaf library to my project using intellij?

804 Views Asked by At

When compiling my main class I get this error:

Main.java:1: error: package com.formdev.flatlaf does not exist import com.formdev.flatlaf.FlatLightLaf;

I have followed all the steps online, I have gone to project structure, libraries, "+", added the flatlaf.jar file and pressed on apply. I have also tried to revalidate caches. The JDK recognises the import of the library as well as all its functions as they all show up in the suggested and give no errors until you try to compile.

1

There are 1 best solutions below

2
Ethan Yin On

Make sure that you've added the library to the module dependencies. enter image description here