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

📄 aboutdialog.java

📁 本程序是用java实现翻牌程序
💻 JAVA
字号:
package fapai;

import java.awt.*;

import javax.swing.*;
import java.awt.Rectangle;
import java.awt.Font;
import javax.swing.BorderFactory;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

/**
 * <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 {
    JPanel panel1 = new JPanel();
    JLabel infojLabel = new JLabel();
    JButton surejButton = new JButton();
    JLabel imagejLabel = 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(), "AboutDialog", false);
    }

    private void jbInit() throws Exception {
        panel1.setLayout(null);
        infojLabel.setFont(new java.awt.Font("宋体", Font.PLAIN, 28));
        infojLabel.setToolTipText("");
        infojLabel.setText("翻牌游戏演示过程");
        infojLabel.setBounds(new Rectangle(64, 62, 293, 95));
        surejButton.setBounds(new Rectangle(216, 233, 106, 54));
        surejButton.setFont(new java.awt.Font("宋体", Font.PLAIN, 20));
        surejButton.setBorder(BorderFactory.createRaisedBevelBorder());
        surejButton.setText("确定");
        surejButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                surejButton_actionPerformed(e);
            }
        });
        imagejLabel.setBounds(new Rectangle(1, 0, 401, 317));
        ImageIcon imageIcon = new ImageIcon("E:/JBuilder/src/com/hx/ibm/fapai/1.jpg");
        imagejLabel.setIcon(imageIcon);
        getContentPane().add(panel1);
        panel1.add(infojLabel);
        panel1.add(surejButton);
        panel1.add(imagejLabel);
        setSize(350,350);
        setVisible(true);

    }

    public void surejButton_actionPerformed(ActionEvent e) {
      dispose();
    }
}

⌨️ 快捷键说明

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