3

I right clicked my project, went to properties, libraries and added miglayout-4.0-swing.jar, but upon writing

JPanel mainwindow = new JPanel(new MigLayout());

in my project it cannot find the MigLayout class, and wants me to create it. Am I doing something wrong?

kleopatra
  • 51,061
  • 28
  • 99
  • 211
David Zorychta
  • 13,039
  • 6
  • 45
  • 81
  • 1
    A number of things come to mind: Restart netbeans, check project properties, libraries, make sure its still there. When you added it to the project, did you chose add Jar/Folder? You've added an import statement for the class right? Attempts to find it with ctrl+space (hit this twice) fail? Are you sure the jar file isn't corrupt? – BillRobertson42 Dec 20 '11 at 05:51

1 Answers1

2

You should go to Tools -> Libraries and create an entry for MigLayout like they show here. Then you add that library to your project.

Community
  • 1
  • 1
Catalina Island
  • 7,027
  • 2
  • 23
  • 42