|
JButton | start = new JButton("Start New Game") |
|
JButton | load = new JButton("Load Game") |
|
JButton | highScores = new JButton("High Scores") |
|
JButton | tutorial = new JButton("Tutorial") |
|
JButton | exit = new JButton("Exit") |
|
JPanel | buttonPanel |
|
§ Welcome()
Constructor for welcome page.
sets the header and size of window, and add buttons to it.
- Set the header of the window
- Set the size of the window
Add buttons on the window
§ addButton()
void view.Welcome.addButton |
( |
JButton |
x | ) |
|
adds buttons to a panel
makes buttons align in the panel
§ addListener()
void view.Welcome.addListener |
( |
ActionListener |
buttonListener | ) |
|
adds action listener to the buttons
- Parameters
-
buttonListener | is the action listener |
§ exit()
JButton view.Welcome.exit |
( |
| ) |
|
gets the button to exit the program
- Returns
- exit
§ getStart()
JButton view.Welcome.getStart |
( |
| ) |
|
gets the start button
- Returns
- start indicates to start a new game
§ highScores()
JButton view.Welcome.highScores |
( |
| ) |
|
gets the button to display high score
- Returns
- highScores
§ load()
JButton view.Welcome.load |
( |
| ) |
|
gets the load button
- Returns
- load indicates to load a new game
§ tutorial()
JButton view.Welcome.tutorial |
( |
| ) |
|
gets the button to display instructions
- Returns
- tutorial
§ buttonPanel
JPanel view.Welcome.buttonPanel |
|
private |
Define a panel for the arrangement of buttons
§ exit
JButton view.Welcome.exit = new JButton("Exit") |
|
private |
§ highScores
JButton view.Welcome.highScores = new JButton("High Scores") |
|
private |
§ load
JButton view.Welcome.load = new JButton("Load Game") |
|
private |
§ start
JButton view.Welcome.start = new JButton("Start New Game") |
|
private |
Variable declarations for the page
- start a new game
- load the previous game
- display high score
- tutorial
- exit the game
§ tutorial
JButton view.Welcome.tutorial = new JButton("Tutorial") |
|
private |
The documentation for this class was generated from the following file: