Hi
I was messing around with java applets just now, and I can't seem to figure out how to put more than one event handler in an applet. I'm just working on a really simple calculator. Three buttons, one to add, one to subtract and one to clear everything. I know it can easily be done with one event handler, but it's not about the program, just about learning how to use more than one. Here's the code, any idea what's wrong? Thanks!
1. what errors do you actually get?
2. ALL class names should begin with a capital
3. you never actually initialize your handlers operatorHandler operation = new operatorHandler();
Thank you! the error was that the buttons weren't doing anything, which is now fixed. But I didn't get why I should capitalize my class names? is that just common practice or is there a reason for it?
Sorry if this is the wrong forum now. But how can I view my applet in a web browser? I used the code below, and I also uploaded operatorHandler.class and clearHandler.class to the directory. Should I have made a .jar file? If so, how?
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.