Hello, I am a beginner taking my first java class, and my teacher posted this example for us to compile and run. However, it doesn't work, and he is slow to respond to my question. Homework is based on extending this program, but it's hard to even begin if the example program doesn't work.
Any kind hearted soul willing to help me? Thanks.
Here is the code. The error message follows.
// Begin code
// End of code
-----------------End of error message---------*/
[ edited to preserve formatting using the [code] and [/code] UBB tags -ds ] [ May 17, 2004: Message edited by: Dirk Schreckmann ]
hi, when i run your code it works... what version jre version are you running?
is this error message really from when you run the code posted?? it refers to a class called Applet that extends Applet. Was your AdderButton class once called Applet? [ May 17, 2004: Message edited by: Ben Buchli ]
I am using java2 sdk 1.4.1, standard edition. Also, I am using this software called Sun One Studio 4 update 1, Community Edition as the graphic interface -- I guess that's what you call it. It has a text editor and compiler all there easy to use. I tried to compile it from the command window by using javac as well, and it gave me the same errors.
In my confusion, I did accidentally name it Applet before, but then I changed the name and saved it and everything, and it stills gives that error. I cut and pasted the program several times into a new file, but that error still comes up like that. If I take the 'extends Applet' part out, it seems to go away.
Thank you for your help. The Applet.java file was still in the same folder as the AdderButton.java file. When I tried to delete it, to my surprise it stated that it was being used, and that I needed to close it in order to delete it. At that time, only the AdderButton.java file was open.
So I guess it was somehow finding it.
Once I closed everything, I was able to delete the Applet.java file, and the AdderButton.java file compiled just fine!
Thank you, thank you, thank you
Your mind is under my control .... your will is now mine .... read this tiny ad