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

📄 aboutdialog.java

📁 固定资产管理
💻 JAVA
字号:
package stage_project;

import java.awt.*;

import javax.swing.*;

/**
 * <p>Title: </p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2008</p>
 *
 * <p>Company: </p>
 *
 * @author not attributable
 * @version 1.0
 */
public class AboutDialog extends JDialog {
    ImageIcon img = new ImageIcon("guanyu.gif");
    JLabel jLabel1 = new JLabel();
    public AboutDialog(Frame owner, String title, boolean modal) {
        super(owner, title, modal);
        try {
            setDefaultCloseOperation(DISPOSE_ON_CLOSE);
            jbInit();
            pack();
        } catch (Exception exception) {
            exception.printStackTrace();
        }
    }
    public AboutDialog() {
        this(new Frame(), "关于", false);
            // Center the window
            Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
            Dimension frameSize = this.getSize();
            Point loc = getLocation();
            //在系统中央显示
            this.setLocation((screenSize.width - frameSize.width) / 4 +loc.x,
                             (screenSize.height - frameSize.height) / 4 + loc.y);

    }

    private void jbInit() throws Exception {
        this.setModal(true);
        this.getContentPane().setLayout(null);
        jLabel1.setIcon(img);
        jLabel1.setBounds(new Rectangle( -2, 0, 404, 250));
        this.getContentPane().add(jLabel1);
    }
}

⌨️ 快捷键说明

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