Millionaire.java
The Millionaire.java contains the main and
it extends JFrame.
Suggestion
private void next(): the response of the program after you
click the next button. The response include:
- shows the millonaire icon
- shows the question number and the money award under the icon.
- increase the level of the
MoneyLabels
- show the question and answers
- set the button to quit
private void start(): the response of the program after
you click the start button. The response is similar to next() with
- the first question showss up
-
MoneyLabels set to level 1
private void restart() : the response of the program after
you click the restart button. Almost same as start()
private void quit() : the response of the program after
you click the quit button. The response includes
- display the money award
- set the button to restart
- show the line "click the restart button for a new game"
- clear all the answer buttons and disable them.
private void correct() : the response of the program after you
click the correct answer. The response includes :
- display the correct message
- set the button to next
- show the line "click the next button for next question".
- disable all the buttons and clear the text on the answer buttons.
private void wrong() : the response of the program after you
can't get the correct answer. The response includes :
- display the sorry message and the money award.
- set the button to restart and the line "click the restart button.... "
private void win() : the response of the program after you
become a millionaire. Similar to restart()
You can change the color of the buttons and backgrounds.
I use cyan.darker() for the background. green.darker() for the buttons. white
for the font. The only exception is that you can't use the default background color or the
foreground color. You can also change the image icon if you like but you have to
name it mill.jpg and submit it