I am trying to use different layout managers but I can't seem to get them to work. I run the JDK off of my jumpdrive and I use BlueJ as my IDE. I have put the Layout jar file in my jre/lib/ext folder and used the following code to access:
The point of "import" is to tell the compiler that a class is in so-and-so package. A package is essentially a named group of classes. Using "import" lets you refer to a class in a package without using the package name each time.
I had to Google it, but apparently MigLayout is a class in the package "net.miginfocom.swing", so the correct import statement would be
Putting the jar file in the jre/lib/ext directory will mean that the JVM will pick it up when you run the program, but the java compiler probably won't (it has it's own version of the jre). You say you put the jar in the classpath as well. Show us your new classpath - you may have made a mistake there. You should also check that the jar file actually contaisn the class you are looking for - you can open it up with any zip utility to check this.
Have you got that eclipse folder in your CLASSPATH? Can you find it on your PC at all? If you can find it, read this, and look for classpath. You end up saying something like "java -cp C:\myfolder\subfolder\EclipseLayouts.jar myApp" Have a look at the documentation for the Mig layouts; it may tell you where you can get the Eclipse file from. If the package name starts with org.miginfocom then you ought to find details on www.miginfocom.org. If that doesn't help, I am not sure what else to suggest, but somebody else will probably have an idea. Good luck.
Did you take that jar file out of your extensions directory (jre/ext/lib) yet? Classes that are in the extensions directory can be accessed from your classpath, but they can't access classes that are in your classpath. That's why using the extensions directory isn't always such a good idea. I've been burnt by that twice in the past, I don't do it any more.