📄 frmabout.java
字号:
import java.awt.BorderLayout;
import java.awt.Frame;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.JToggleButton;
import java.awt.*;
import javax.swing.JButton;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JLabel;
public class FrmAbout extends JDialog {
JPanel panel1 = new JPanel();
JButton jButton1 = new JButton();
JButton jButton2 = new JButton();
JLabel jLabel1 = new JLabel();
JLabel jLabel2 = new JLabel();
JLabel jLabel3 = new JLabel();
JLabel jLabel4 = new JLabel();
public FrmAbout(Frame owner, String title, boolean modal) {
super(owner, title, modal);
Dimension de = Gload.de;
this.setBounds((de.width - 400)/2, (de.height-150)/2, 400, 150);
try {
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
jbInit();
setSize(400, 150);
this.setResizable(false);
} catch (Exception exception) {
exception.printStackTrace();
}
}
public FrmAbout() {
this(new Frame(), "关于图书管理系统", true);
}
private void jbInit() throws Exception {
panel1.setLayout(null);
jButton1.setBounds(new Rectangle(304, 23, 69, 22));
jButton1.setText("确 定");
jButton1.addActionListener(new FrmAbout_jButton1_actionAdapter(this));
jButton2.setBounds(new Rectangle(304, 57, 69, 23));
jButton2.setText("取 消");
jButton2.addActionListener(new FrmAbout_jButton2_actionAdapter(this));
jLabel1.setText("图书管理系统");
jLabel1.setBounds(new Rectangle(13, 17, 244, 22));
jLabel2.setText("Version: 1.0.0.0");
jLabel2.setBounds(new Rectangle(14, 41, 214, 20));
jLabel3.setText("开发团队: 曾耀南 林俊海 黄仁福 柯梓楷 郭小冬");
jLabel3.setBounds(new Rectangle(12, 62, 282, 23));
jLabel4.setText("警告: 版权没有 翻版不究");
jLabel4.setBounds(new Rectangle(16, 93, 239, 30));
panel1.add(jButton1);
panel1.add(jButton2);
panel1.add(jLabel1);
panel1.add(jLabel2);
panel1.add(jLabel3);
panel1.add(jLabel4);
this.getContentPane().add(panel1, java.awt.BorderLayout.CENTER);
}
public void jButton2_actionPerformed(ActionEvent e) {
this.dispose();
}
public void jButton1_actionPerformed(ActionEvent e) {
this.dispose();
}
}
class FrmAbout_jButton1_actionAdapter implements ActionListener {
private FrmAbout adaptee;
FrmAbout_jButton1_actionAdapter(FrmAbout adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jButton1_actionPerformed(e);
}
}
class FrmAbout_jButton2_actionAdapter implements ActionListener {
private FrmAbout adaptee;
FrmAbout_jButton2_actionAdapter(FrmAbout adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jButton2_actionPerformed(e);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -