The code as posted generates the following error:
javac GridLayoutDemo.java
GridLayoutDemo.java:7: cannot find symbol
symbol : class gridLayoutFrame
location: class GridLayoutDemo
gridLayoutFrame gridLayoutFrame = new GridLayoutFrame();
^
1 error
As Sunny Kumar noted you need to change the first gridLayoutFrame to GridLayoutFrame. This is because the compiler is looking for a type named gridLayoutFrame and it doesn't exist. Change this to GridLayoutFrame and the classes compile and run fine. You get a window that has six light blue buttons labeled one through six. You click one and the layout changes.
One thing I notice is that you are getting two error messages but
you should only be getting one. This implies that even when you fixed the code correctly something else may be preventing the compiler from seeing the GridLayoutFrame class. Maybe there is something messed up in your classpath?
[ January 14, 2006: Message edited by: John Wetherbie ]