aboutwindowsxh.java
来自「操作系统文件管理,全WINDOWS界面,实现鼠标事件处理,键盘事件处理等功能,屏」· Java 代码 · 共 57 行
JAVA
57 行
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
public class Aboutwindowsxh extends JDialog {
JPanel panel1 = new JPanel();
JPanel jPanel1 = new JPanel();
JLabel jLabel1 = new JLabel();
JLabel jLabel2 = new JLabel();
JButton jButton1 = new JButton();
public Aboutwindowsxh(Frame frame, String title, boolean modal) {
super(frame, title, modal);
try {
jbInit();
pack();
}
catch(Exception ex) {
ex.printStackTrace();
}
}
public Aboutwindowsxh() {
this(null, "", false);
}
private void jbInit() throws Exception {
jLabel1.setText("");//Windows XH copyrights by 辛华
jLabel2.setIcon(new ImageIcon("xh.gif"));
jButton1.setText("确定");
jButton1.addActionListener(new Aboutwindowsxh_jButton1_actionAdapter(this));
getContentPane().add(panel1);
panel1.add(jLabel2);
panel1.add(jLabel1, null);
this.getContentPane().add(jPanel1, BorderLayout.SOUTH);
jPanel1.add(jButton1, null);
this.setLocation(400,300);
this.setSize(300,300);
this.setVisible(true);
this.setTitle("About");
}
void jButton1_actionPerformed(ActionEvent e) {
this.dispose();
}
}
class Aboutwindowsxh_jButton1_actionAdapter implements java.awt.event.ActionListener {
Aboutwindowsxh adaptee;
Aboutwindowsxh_jButton1_actionAdapter(Aboutwindowsxh adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jButton1_actionPerformed(e);
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?