// This Class is (c)opyright 1999 by Geoff Knagge. It may be freely used // for any non-commercial purpose on the following conditions: // 1. You indemnify the copyright holder of all possible liability // resulting from its use. // 2. You provide a link back to the source of this file, that is // http://browse.to/gogogeoff // // Use of this class shows your agreement to the above. import java.awt.*; import java.awt.event.*; public class PNZAnswer extends Dialog implements ActionListener, WindowListener { ColourPanel thisGuessPanel; Button OK; /// these are needed to implement WindowListener classes public void windowClosing (WindowEvent e) { setVisible(false); } public void windowActivated (WindowEvent e) {} public void windowClosed (WindowEvent e) {} public void windowDeactivated (WindowEvent e) {} public void windowDeiconified (WindowEvent e) {} public void windowIconified (WindowEvent e) {} public void windowOpened (WindowEvent e) {} /// needed to implement the ActionListener public void actionPerformed(ActionEvent e) { setVisible(false); } public PNZAnswer(Frame f,PNZColours parent,int[] target, String title) { // inputs : Frame to tie the Dialog to, the calling class, // the array of winning colours, dialog title super(f,title,true); setBackground(new Color(96,192,255)); setLayout(new GridLayout(3,1)); Label thisGuess = new Label("The winning combination was as follows :"); thisGuessPanel = new ColourPanel(parent,"", target.length, true); for (int cnt=0; cnt