Any idea why the code
here is returning an error, when trying to compile it from the command line?
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
...
>javac GridBagLayout.java
javac: file not found: GridBagLayout.java
Usage: javac <options> <source files>
use -help for a list of possible options
>javac GridBagLayoutDemo.java
>
java GridBagLayoutDemo.java
Exception in
thread "main" java.lang.NoClassDefFoundError: GridBagLayoutDemo/java
Caused by: java.lang.ClassNotFoundException: GridBagLayoutDemo.java
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: GridBagLayoutDemo.java. Program will exit.
Basically, I was trying to understand whether changing the GridBagConstraints would have a visual impact on the display: