about.java

来自「accp s1毕业项目 考试管理系统」· Java 代码 · 共 55 行

JAVA
55
字号
package com.exam.ui.game;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;

import com.exam.ui.SuperFrame;

public class About extends SuperFrame {
	private static final long serialVersionUID = 1L;

	public About() {
		try {
			init();
			this.setVisible(true);
			this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	private void init() {
		this.setTitle("关于 扫雷");
		this.setSize(200, 150);
		this.setCenter();
		this.setAlwaysOnTop(true);

		JPanel pnlTotal = new JPanel();
		this.getContentPane().add(pnlTotal);
		pnlTotal.setLayout(null);

		JLabel lblName = new JLabel("Author:Lindsay·Luo");
		lblName.setBounds(40, 10, 130, 25);
		pnlTotal.add(lblName);

		JLabel lblEdtion = new JLabel("Version:1.0");
		lblEdtion.setBounds(60, 40, 100, 25);
		pnlTotal.add(lblEdtion);

		JButton btnOK = new JButton("确定");
		btnOK.setBounds(60, 70, 60, 25);
		pnlTotal.add(btnOK);

		btnOK.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				dispose();
			}
		});
	}
}

⌨️ 快捷键说明

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