I'm taking a Java class at school and almost every computer seems to heaving the same problem and we can't figure out what is wrong. We are using Codewarrior on XP machines. We wrote an applet and when we try to run it, everyone gets the same error saying that the main class needs to be declared as 'abstract'. Now the really weird thing about all this is that for some reason one person's applet worked, so I copied his .java file (which is the same as mine and everyone elses) onto a disk and put it in a new project on my computer and it worked fine. I've done this on every computer now and it works. I've gone through line by line and his program is EXACTLY the same as everyone elses. Does anyone know why this is happening and what the error means when it says the class needs to be declared as 'abstract'? Any help would be appreciated. Thanks.
The error I kept getting said something about needing to declare the CheckBoxApplet class as "abstract". I would post the entire error, but I can't get it anymore now that I've "fixed" the program. All I did was copy and paste the .java file into a new project and now it works. I'm not sure why that worked, but it did.
mostly (perhaps always) the reason for needing to declare a class as abstract, is because you don't implement all members of the interface. So it is not a true implementation of the interface, but you have to extend this class to get all interfacemembers implemented.
I'm glad you figured it out; now how about the rest of us.
I'm having the same exact problem. I work on applets at my school, none of the computers work when I try to use any Listeners, and no even my teacher knows what to do. Once, only once, we got it to work by changing the JDK Profile on an administrator account. Now we cant figure out what we did, why it worked, or why, no matter what we try, it still wont work. help, please. I need to figure this out to graduate.
forget it. i used his code to fix my own. i still dont know why my last code worked on one computer and not on any others, but my new code, and his code works fine. i'll just accept it now that i can make it work. thanks for posting, it helped me out.