简体   繁体   English

如何在IntelliJ中使用MigLayout?

[英]How to use MigLayout in IntelliJ?

I have no idea how to get MigLayout to work in IntelliJ (I'm sort of a noob at IntelliJ). 我不知道如何使MigLayout在IntelliJ中工作(我在IntelliJ上有点菜鸟)。 I am currently using the 2017.3.5 community edition. 我当前正在使用2017.3.5社区版。

I've downloaded the jar file, but I can't seem to import it correctly. 我已经下载了jar文件,但似乎无法正确导入它。

I have import net.miginfocom.swing.MigLayout; 我已经import net.miginfocom.swing.MigLayout; at the top of my main file, but when I try to compile my code, I keep getting an error 在我的主文件的顶部,但是当我尝试编译代码时,我不断收到错误消息

Error:(40, 30) java: cannot access net.miginfocom.layout.LC class file for net.miginfocom.layout.LC not found

Any idea what I'm doing wrong? 知道我在做什么错吗?

Sorry for late. 对不起我迟到了。 But it will help somebody. 但这会帮助别人。 IntelliJ Idea will allow to download a maven dependency as a Jar file under the lib folder. IntelliJ Idea将允许将maven依赖项下载为lib文件夹下的Jar文件。

在此处输入图片说明

在此处输入图片说明

在此处输入图片说明

尝试:文件->项目结构->选择左侧的模块->选择依赖项选项卡->在右侧或底部找到+->添加.jar

Also include the core lib. 还包括核心库。 You can get it here 你可以在这里得到

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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