File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes JApplet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "JApplet" Watch "JApplet" New topic
Author

JApplet

Brad Page
Greenhorn

Joined: Oct 13, 2003
Posts: 9
I am having a problem with this basic game. I can get it to work right, if u choose the right or wrong answer. Any assistance would be appreciated.
[ edited to fix code formatting -ds ]
[ December 09, 2003: Message edited by: Dirk Schreckmann ]
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Do you have a specific question?


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Brad Page
Greenhorn

Joined: Oct 13, 2003
Posts: 9
sorry...My problem is during the game, if you choose the wrong answer, it gives me the right response, but the counter isnt working, so the game ends.
also, if you choose the correct answer, nothing happens.
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
You definitely have problems with your program logic that occurs when the actionPerformed method is invoked.
Why do you have a while loop in the actionPerformed method? Should that while loop actually be an if statement? It works quite a bit better when that change is made, but it isn't perfect.
How's it going?
Brad Page
Greenhorn

Joined: Oct 13, 2003
Posts: 9
thanks, I had it fixed a couple of hours later. I figured out what I did wrong.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JApplet