⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 aboutdialog.java

📁 数据结构及算法 对于参加ACM的学生有一定帮助 里面有详细的解答
💻 JAVA
字号:
//
//  Unified Library Application
//  Case study in Unified Modeling Language Toolkit
//
//  AboutDialog.java
//
//
//  Copyright (c) 1998 John Wiley & Sons, Inc. All rights reserved.
//  Reproduction or translations of this work beyond that permitted
//  in Section 117 of the 1976 United States Copyright Act without
//  the express written permission of the copyright owner is unlawful.
//  Requests for further information should be addressed to Permissions
//  Department, John Wiley & Sons, Inc. The purchaser may make back-up
//  copies for his/her own use only and not for distribution or resale.
//  The Publisher assumes no responsibility for errors, omissions, or
//  damages, caused by the use of these programs of from the use of the
//  information contained herein.

package ui;
import java.awt.*;
import java.applet.*;

public class AboutDialog extends Dialog {
    private Image image;
    public void paint(Graphics gr)
    {
        gr.drawImage(image,20,40,this);
    }
	void okButton_Clicked(Event event) {
		//{{CONNECTION
		dispose();
		//}}
	}

	public AboutDialog(Frame parent, boolean modal,Toolkit toolkit) {

	    super(parent, modal);

        image = toolkit.getImage("graphbook.gif");
		//{{INIT_CONTROLS
		setLayout(null);
		addNotify();
		resize(insets().left + insets().right + 672,insets().top + insets().bottom + 210);
		label4 = new java.awt.Label("By Eriksson and Penker, Wiley And Sons 1997");
		label4.reshape(insets().left + 336,insets().top + 120,324,21);
		add(label4);
		label3 = new java.awt.Label("Pictures from Corel Mega Gallery");
		label3.reshape(insets().left + 384,insets().top + 156,252,21);
		add(label3);
		okButton = new java.awt.Button("OK");
		okButton.reshape(insets().left + 456,insets().top + 84,66,27);
		add(okButton);
		label2 = new java.awt.Label("Unified Modeling Language Toolkit");
		label2.reshape(insets().left + 372,insets().top + 48,252,21);
		add(label2);
		label1 = new java.awt.Label("The Unified Library Application Case Study");
		label1.reshape(insets().left + 360,insets().top + 12,300,21);
		add(label1);
		setTitle("About Unified Libary Application...");
		setResizable(false);
		//}}

	}

    public synchronized void show() {
    	Rectangle bounds = getParent().bounds();

    	move(bounds.x, bounds.y);

    	super.show();
    }

	public boolean handleEvent(Event event) {
	    if(event.id == Event.WINDOW_DESTROY) {
	        dispose();
	        return true;
	    }
		if (event.target == okButton && event.id == Event.ACTION_EVENT) {
			okButton_Clicked(event);
		}
		return super.handleEvent(event);
	}

	//{{DECLARE_CONTROLS
	java.awt.Label label4;
	java.awt.Label label3;
	java.awt.Button okButton;
	java.awt.Label label2;
	java.awt.Label label1;
	//}}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -