📄 aboutmine.java
字号:
/** * 文件:AboutMine.java * 说明:程序“关于”对话框 */package javamine;import java.awt.event.*;import java.awt.*;import javax.swing.*;class AboutMine extends JDialog{ private JPanel aboutPane; private JLabel msg; private JLabel msg1; private JLabel msg2; private JButton exit; public AboutMine(String strName, JFrame c) {//容器 super(c,strName,true); setSize(180, 120); setResizable(false); aboutPane = new JPanel(); msg = new JLabel("Java 扫雷 "); msg1 = new JLabel("作者:Dante "); msg2 = new JLabel("版本: 1.0.0.0"); exit = new JButton("确定"); exit.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e){ setVisible(false); } }); aboutPane.add(msg); aboutPane.add(msg1); aboutPane.add(msg2); aboutPane.add(exit); Point rv=c.getLocation(); setLocation(rv.x+50,rv.y+70); setContentPane(aboutPane); } }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -