About Dialog (2)

class PopupDialog implements ActionListener {
   Dialog dialog = null;

   public void actionPerformed(ActionEvent e) {
      if (dialog == null) {
         dialog = new Dialog((Frame)getParent(), "About ...", true);
         Button btn = new Button("Ok");
         btn.addActionListener(new DownDialog());
         Label label = new Label("About: Version 1.0, 1997");
         dialog.add("South", btn);
         dialog.add("Center", label);
         dialog.resize(200, 100);
      }
      dialog.setVisible(true);
   }
}


Slide 104 ©Copyright 1997 Jan Newmarch