954,518 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

repeating the whole program after pressing Yes button in the confirmation message box

:?: hello everyone, id like to ask for some help. i am a beginner in Java programming. i am doing mastermind game using java. the whole logic of the game is already finished, and my ONLY problem now is :?: HOW will i be able to repeat the whole game after the user press the YES Button from the message box asking him/her if he/she wants to play again...this makes it hard for me to finish the program. hope u guys can help me. thanks a lot :)

psylocke
Newbie Poster
18 posts since Sep 2004
Reputation Points: 11
Solved Threads: 0
 

I usually make another object of the gui class ... but I dont know how to get the running object closed .. cuz when I close the running object .. it throws an exception.....

nanosani
Unauthenticated Liar
Team Colleague
1,830 posts since Jul 2004
Reputation Points: 45
Solved Threads: 56
 

where do u specifically declare the object of that same gui class?

psylocke
Newbie Poster
18 posts since Sep 2004
Reputation Points: 11
Solved Threads: 0
 
I usually make another object of the gui class ... but I dont know how to get the running object closed .. cuz when I close the running object .. it throws an exception.....

i would like to try creating an object of that GUI class, but where will i create it? i mean where can i replace that object?

psylocke
Newbie Poster
18 posts since Sep 2004
Reputation Points: 11
Solved Threads: 0
 

you should make the object in the button's action listener ... it will popup another frame of your program.

nanosani
Unauthenticated Liar
Team Colleague
1,830 posts since Jul 2004
Reputation Points: 45
Solved Threads: 56
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You