GuessingGameGUI
Class GuessingGameGUI
Copyright By PowCoder代写 加微信 powcoder
java.lang.Object
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
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
GuessingGameGUI
public GuessingGameGUI()
Constructor.
Method Detail
public void createGUI()
Create the main GUI estate under control of
a GridLayout manager.
createMenus
public void createMenus()
Set up the 3 menu options.
public static void main(java.lang.String[] args)
To permit standalone operation.
public void resetGUI()
Reset all GUI values to their initial settings.
public void run()
Required by the Runnable interface.
Specified by:
run in interface java.lang.Runnable
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.
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com