// File: AboutDialog.java // Classes: AboutDialog // Original Author: Kedar Patankar // Date : 21 Jan 1997 package uci.graphedit; import java.awt.Button; import java.awt.Frame; import java.awt.TextArea; import java.awt.BorderLayout; import java.awt.Event; import java.awt.Font; import java.awt.Color; import gjt.GJTDialog; import gjt.DialogClient; import gjt.ButtonPanel; public class AboutDialog extends GJTDialog { private Button _execute; public AboutDialog(Frame frame,DialogClient dialogClient,String title) { super(frame,title,dialogClient,true); setLayout(new BorderLayout()); TextArea about = fillLabel(); add("Center",about); about.setBackground(Color.lightGray); ButtonPanel buttonPanel= new ButtonPanel(); _execute = new Button("Ok"); buttonPanel.add(_execute); buttonPanel.setBackground(Color.lightGray); add("South",buttonPanel); pack(); } private TextArea fillLabel() { TextArea aboutLabel; String about = "Thank you for using Cd Draw Software. \n\n" + "This product is being developed at the \n" + "College of Computer Science, Northeastern University. \n" + "Send any Questions or Comments to : \n"+ "Kedar Patankar \n" + "E-mail kedar@ccs.neu.edu. \n" + "URL : http://www.ccs.neu.edu/home/kedar. \n " ; aboutLabel=new TextArea(about); aboutLabel.setFont(new Font("Times Roman",Font.BOLD,12)); aboutLabel.setEditable(false); return aboutLabel; } public void show() { _execute.requestFocus(); super.show(); } public boolean handleEvent(Event e) { switch(e.id) { case Event.WINDOW_DESTROY: close(); return true; } return super.handleEvent(e); } public boolean action(Event e, Object what) { if (e.target == _execute) { close(); return true; } return false; } public void close() { hide(); dispose(); } } /* end class AboutDialog */