Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JApplet

 
Brad Page
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you have a specific question?
 
Brad Page
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks, I had it fixed a couple of hours later. I figured out what I did wrong.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic