home *** CD-ROM | disk | FTP | other *** search
- import java.awt.Button;
- import java.awt.Component;
- import java.awt.Container;
- import java.awt.Dialog;
- import java.awt.Event;
- import java.awt.Font;
- import java.awt.Frame;
- import java.awt.Label;
- import java.awt.LayoutManager;
-
- public class cooabout extends Dialog {
- Label label1;
- Button okButton;
- Label label2;
- Label label3;
- Label label4;
-
- void okButton_Clicked(Event event) {
- ((Component)this).hide();
- }
-
- public cooabout(Frame parent, String L0, String L1, String L2, boolean modal) {
- super(parent, modal);
- ((Container)this).setLayout((LayoutManager)null);
- ((Dialog)this).addNotify();
- ((Component)this).resize(((Container)this).insets().left + ((Container)this).insets().right + 333, ((Container)this).insets().top + ((Container)this).insets().bottom + 150);
- this.label1 = new Label("CooCoo");
- this.label1.reshape(((Container)this).insets().left + 12, ((Container)this).insets().top + 12, 312, 36);
- this.label1.setFont(new Font("Helvetica", 3, 35));
- ((Container)this).add(this.label1);
- this.okButton = new Button("OK");
- this.okButton.reshape(((Container)this).insets().left + 252, ((Container)this).insets().top + 108, 66, 27);
- ((Container)this).add(this.okButton);
- this.label2 = new Label("version 1.21");
- this.label2.reshape(((Container)this).insets().left + 228, ((Container)this).insets().top + 60, 84, 16);
- ((Container)this).add(this.label2);
- this.label3 = new Label("1997 Mark Qian");
- this.label3.reshape(((Container)this).insets().left + 12, ((Container)this).insets().top + 96, 97, 13);
- ((Container)this).add(this.label3);
- this.label4 = new Label("All right reserved");
- this.label4.reshape(((Container)this).insets().left + 12, ((Container)this).insets().top + 120, 108, 13);
- ((Container)this).add(this.label4);
- ((Dialog)this).setTitle("About CooCoo");
- ((Dialog)this).setResizable(false);
- ((Dialog)this).setTitle(L0);
- this.label1.setText(L1);
- this.label2.setText(L2);
- }
-
- public synchronized void show() {
- ((Component)this).move(200, 200);
- super.show();
- }
-
- public boolean handleEvent(Event event) {
- if (event.id == 201) {
- ((Component)this).hide();
- return true;
- } else {
- if (event.target == this.okButton && event.id == 1001) {
- this.okButton_Clicked(event);
- }
-
- return super.handleEvent(event);
- }
- }
- }
-