All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Window
|
+----java.awt.Dialog
|
+----com.monpetitcoin.java.PrisonerGame.PrisonerGame.OptionsDialog
The dialog also displays a warning that changing any of the above parameters (except the refresh frequency) restarts the game.
applyOptions() method.
private java.awt.Button cancelButton
private java.awt.Button okButton
private java.awt.TextField widthField
private java.awt.TextField heightField
private java.awt.TextField gainField
private java.awt.TextField thresholdField
private java.awt.TextField refreshField
public PrisonerGame.OptionsDialog(com.monpetitcoin.java.PrisonerGame.PrisonerGame this$0,
java.awt.Frame parent,
java.lang.String title)
private boolean applyOptions()
restartGame() method of the parent
PrisonerGame instance. A format error in a number calls up an alert window.
If only the refresh frequency was changed, the game is not restarted. The new value is just set
and any running PrisonerGame takes it in stride (note that the setRefreshFrequency() method is
synchronized).
return The method returns false if an error occured
public void actionPerformed(java.awt.event.ActionEvent e)
applyOptions() method.
If the latter returns true or the "Cancel" button was pressed, the dialog box is disposed of.
All Packages Class Hierarchy This Package Previous Next Index