Problem in java Applet code, please help?
-
I have a problem, an error on my : public void MenuChoice() (ActionEvent e) the error is on the brackets surrounding the ActionEvent e also I wanted to know how it was possible to use multiple methods under an if statement, my applet is supposed to show two buttons, a start and display high scores, under start it will run the ping pong game but I get an error at the open { of the if and at the else if statement, what can I do? this is not homework or assignment work I assure you, I am trying to learn java on my own and any help would be much appreciated. i understand pictures would make it a lot easier so if you think you can help but need to see an image please feel free to email me at [email protected]
-
Answer:
Remove the empty set of parentheses. I'm not sure about the other question, it could be anything. Maybe post some of the code around the if statement.
Ahren Posthumus at Yahoo! Answers Visit the source
Other answers
Your class needs IMPLEMENT ACTIONLISTENER public class AppletNameHere implements ActionListener When you created the button that was going to need to use the code, the button needs to be given the path. startButton = new Button("Start"); startButton.addActionListener(this); Now your problem: public void MenuChoice(ActionEvent e) { code that runs when you click start; }
Hieu N.
Related Q & A:
- How to create a java applet?Best solution by Stack Overflow
- I did something really bad and now i need help please help me.Best solution by Yahoo! Answers
- Why am I having this problem with java or Windows Installer?Best solution by Yahoo! Answers
- Ps3 problem please help!?Best solution by Yahoo! Answers
- FINANCIAL AID PROBLEM, PLEASE HELP?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.