View Single Post
Old 08-18-2006, 01:58 AM   #2 (permalink)
Belisarius
Java fanboy
 
Belisarius's Avatar
 
Join Date: Aug 2003
Posts: 1,114
Belisarius is on a distinguished road
You've declared a class withing a class. Being that you're just starting Java, this is probably not what you want to do - it's a more advanced technique, and generally not neccessary.

Furthermore, you call "super()" in the constructor ("public CommentsExample()") of your inner class. This calls the constructor of the parent class. You are not extending CommentsExample from anything, so the "super()" call is superfluous.

You are not doing anything applet-ly, so you can remove the "public class comments extends Applet" declaration. Then your program should work. Just realize it won't be an applet - you'll need to run it from the command line.
__________________
GitS
Belisarius is offline   Reply With Quote