GroupLayout is the class used by Netbeans to create GUIs using Matisse. GroupLayout is standard in the JDK as of Java 1.6 (6). However prior to that you will need to make sure swing-layout-1.0.jar is on your classpath.
Joined: Oct 17, 2006
Er... So does that mean I should really delete those code or is there something I need to do with the way I execute the program?
Joined: Aug 31, 2006
Well I'm going to assume you actually used GroupLayout to make your GUI, so its absolutely required (you most likely did if you used Netbeans visual GUI makes).
The good news all you have to do is add swing-layout-1.0.jar to your classpath. your current -classpath option adds the classes in the "c:\Program Files\Java\Java Files" directory to your classpath you just need to expand this to include swing-layout-1.0.jar like -classpath "c:\Program Files\Java\Java Files";c:\PATHTOJAR\swing-layout-1.0.jar
swing-layout-1.0.jar is somewhere in the netbeans directory.
Are you going to want to eventually distribute this? Then you should look at packaging your code in a jar with a MANIFEST.MF file and include your dependencies with it. Or use java web start. Or some third party installer. Or...
Joined: Jan 24, 2006
i dont know if you want to do it, but i had an assignment that was originally created in netbeans, there was meaningless package imports..
remove the package imports that have to do with the file/classes you created...
and just make sure all the files are in the same directory, they should compile and run fine...
i dont know about all that other stuff, but it always works for me... i like visual studio better, netbeans/eclipse arent that great
[removed encouragement to use pirated software - Ilja]
Pretty cool. Now I have an executable jar file that can run the program outside NetBeans. It's a little annoying though to always have this swing-layout-1.0.jar in the same directory as my jar file. Is this really how it should be or is there a way for the program to run on its own?