java.lang.ObjectGuessingGameGUI
public class GuessingGameGUI
A Swing GUI for the Guessing Game project
| Field Summary | |
|---|---|
(package private) javax.swing.JFrame |
f
|
(package private) GuessingGame |
game
|
(package private) javax.swing.JLabel |
info
|
(package private) javax.swing.JTextField |
ourGuess
|
(package private) javax.swing.JPanel |
p
|
(package private) javax.swing.JLabel |
turns
|
| Constructor Summary | |
|---|---|
GuessingGameGUI()
Constructor. |
|
| Method Summary | |
|---|---|
void |
createGUI()
Create the main GUI estate under control of a GridLayout manager. |
void |
createMenus()
Set up the 3 menu options. |
static void |
main(java.lang.String[] args)
To permit standalone operation. |
void |
resetGUI()
Reset all GUI values to their initial settings. |
void |
run()
Required by the Runnable interface. |
void |
showAbout()
Display information about this application. |
void |
updateDisplay(int x)
Updates the GUI as a result of the current guess. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
javax.swing.JFrame f
GuessingGame game
javax.swing.JLabel info
javax.swing.JTextField ourGuess
javax.swing.JPanel p
javax.swing.JLabel turns
| Constructor Detail |
|---|
public GuessingGameGUI()
| Method Detail |
|---|
public void createGUI()
public void createMenus()
public static void main(java.lang.String[] args)
public void resetGUI()
public void run()
run in interface java.lang.Runnablepublic void showAbout()
public void updateDisplay(int x)
the - current user guess as an int.