/* * Warning program with a Cancel button * * Author: Chris Johnson (johnson@dcs.gla.ac.uk) * Last revision date: 11/10/98 * * Produces a simple warning on the screen. Illustrates the * use of a frame and of a simple event handler in AWT 1.0 * Based on an example by Judy Bishop */ /* * 1.0 version. */ import java.awt.*; public class ButtonWarning extends Frame { static private final int horigap = 15; static private final int vertigap = 10; private Button quitButton; public ButtonWarning (String[] message, int n) { setBackground(Color.white); setForeground(Color.black); setLayout(new FlowLayout(FlowLayout.CENTER, horigap, vertigap)); for (int i=0; i