game
Class PlayGame
- ActionListener, ItemListener, ListSelectionListener, Transport
public class PlayGame
extends JApplet
implements ActionListener, Transport, ItemListener, ListSelectionListener
This class provides the GUI interfacing between the user and the machine It
uses the swing functionality to provide a good interfacing
void | actionPerformed(ActionEvent ae) - This method is used to handle the events caused by the clicking of the
buttons.
|
void | itemStateChanged(ItemEvent ie) - Called when the item in the JComboBox is changed
|
static void | main(args[] ) - This is the main method.
|
@Override | void valueChanged(ListSelectionEvent evt) - This method displays the previous positions of the detectives and Mr.
|
font
public static Font font
actionPerformed
public void actionPerformed(ActionEvent ae)
This method is used to handle the events caused by the clicking of the
buttons.
ae
- the ActionEvent object which has the details of the event.
itemStateChanged
public void itemStateChanged(ItemEvent ie)
Called when the item in the JComboBox is changed
ie
- the ItemEvent object which has the details of this event
main
public static void main(args[] )
This is the main method. Called when run as an application.
void valueChanged
public @Override void valueChanged(ListSelectionEvent evt)
This method displays the previous positions of the detectives and Mr. X on the
map after the game is over.