/////// TicApButton.java /////// import java.applet.Applet; import java.awt.Button; import java.awt.event.*; // This unmove button applet works with another // game playing applet // to play tic tac toe with unmove public class TicApButton extends Applet { public void init() { b = new Button(" Unmove "); add(b); b.addActionListener(new ActionHandler()); String tg = getParameter("game"); Applet t = getAppletContext().getApplet(tg); ticGame = (TicTacUn) t; } private final class ActionHandler implements ActionListener { public void actionPerformed(ActionEvent e) { ticGame.unMove(); } } Button b; TicTacUn ticGame = null; }