Class GuessingGameGUI

java.lang.Object
  extended by GuessingGameGUI
All Implemented Interfaces:
java.lang.Runnable

public class GuessingGameGUI
extends java.lang.Object
implements java.lang.Runnable

A Swing GUI for the Guessing Game project

Version:
1.0
Author:
Kingsley Sage

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

f

javax.swing.JFrame f

game

GuessingGame game

info

javax.swing.JLabel info

ourGuess

javax.swing.JTextField ourGuess

p

javax.swing.JPanel p

turns

javax.swing.JLabel turns
Constructor Detail

GuessingGameGUI

public GuessingGameGUI()
Constructor.

Method Detail

createGUI

public void createGUI()
Create the main GUI estate under control of a GridLayout manager.


createMenus

public void createMenus()
Set up the 3 menu options.


main

public static void main(java.lang.String[] args)
To permit standalone operation.


resetGUI

public void resetGUI()
Reset all GUI values to their initial settings.


run

public void run()
Required by the Runnable interface.

Specified by:
run in interface java.lang.Runnable

showAbout

public void showAbout()
Display information about this application.


updateDisplay

public void updateDisplay(int x)
Updates the GUI as a result of the current guess.

Parameters:
the - current user guess as an int.