//***************************************************************************** // PopUpWin.java // 3/11/00 // // File used to test the canvas: pops up the frame with a start button // // Geetika Tewari // // //***************************************************************************** import java.awt.*; import java.awt.event.*; import java.lang.*; import java.io.*; import java.applet.*; public class PopUpWin extends Applet implements ActionListener{ ColorFrame cf; Button bopen, bclose; //****************** // // init // //****************** public void init() { setBackground(Color.white); bopen = new Button("Open"); bclose = new Button("Close"); add(bopen); add(bclose); bopen.addActionListener(this); bclose.addActionListener(this); }//end of init //*********************************** // // actionPerfomed // //*********************************** public void actionPerformed(ActionEvent e){ if(e.getSource() == bopen) { cf = new ColorFrame("Color Selecting Window"); } else if (e.getSource() == bclose) { try { cf.dispose(); }// end try catch (NullPointerException npe) { System.out.println("in PopUpWin (shouldn't do close before open)"); }// end catch }// end else if }//end of actionPerformed }//end of applet