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

📄 frameabout.java

📁 多页文本编辑器
💻 JAVA
字号:
/*
 * FrameAbout.java
 *
 * Created on 2007年10月22日, 上午11:39
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package multipageeditor;

/**
 *
 * @author linda
 */
import javax.swing.*;
import java.awt.event.*;

public class FrameAbout extends JFrame {
	public FrameAbout() {//构造方法
		try {
			FrameAboutInit();//窗口初始化
			this.setTitle("关于...");
			this.setSize(320,200);
			this.setLocationByPlatform(true);
			this.setVisible(true);
		} 
                catch (Exception ex) {
			ex.printStackTrace();
		}
	}

	private void FrameAboutInit() throws Exception {//窗口初始化
		this.getContentPane().setLayout(null);
		jButton1.setText("确  定");
		jButton1.addActionListener(new FrameAbout_jButton1_actionAdapter(this));
		jLabel1.setText("多页文本编辑器");
		jLabel2.setText("版本  V1.0");
		jLabel3.setText("copyright (C)  2006-2007");
                jLabel1.setBounds(105,5,140,40);
		this.getContentPane().add(jLabel1);
                jLabel2.setBounds(120,35,120,40);
                this.getContentPane().add(jLabel2);
                jLabel3.setBounds(90,65,200,40);
                this.getContentPane().add(jLabel3);
                jButton1.setBounds(110,120,80,30);
                this.getContentPane().add(jButton1);
	}

	JButton jButton1 = new JButton();
	JLabel jLabel1 = new JLabel();
	JLabel jLabel2 = new JLabel();
	JLabel jLabel3 = new JLabel();
        //“确定”按钮事件处理
	public void jButton1_actionPerformed(ActionEvent e) {
		this.dispose();
	}
        //窗口事件处理
	protected void processWindowEvent(WindowEvent e) {
		if (e.getID() == WindowEvent.WINDOW_CLOSING) {
			this.dispose();
		}
		super.processWindowEvent(e);
	}
}
//侦听按钮事件
class FrameAbout_jButton1_actionAdapter implements ActionListener {
	private FrameAbout adaptee;

	FrameAbout_jButton1_actionAdapter(FrameAbout adaptee) {
		this.adaptee = adaptee;
	}

	public void actionPerformed(ActionEvent e) {
		adaptee.jButton1_actionPerformed(e);
	}
}

⌨️ 快捷键说明

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