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

📄 about.java

📁 类似Windows下的Notepad 并实现其他使用功能
💻 JAVA
字号:
package dazuoye;

import java.awt.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

import javax.swing.*;

/**
 * @author wang xiaoling B04041413
 *
 */
@SuppressWarnings("serial")
public class about extends JDialog{

	JLabel intro;
	JLabel version;
	JDialog aboutDlg;
	
	public about(){
		version=new JLabel("Version: NotePad 1.0");
		version.setHorizontalAlignment(JLabel.CENTER);
		intro=new JLabel("(c)2006-2007 B04041413王晓玲",JLabel.CENTER);
		aboutDlg=new JDialog();
		aboutDlg.setTitle("About");
		aboutDlg.setLayout(new FlowLayout());
		aboutDlg.add(version);
		aboutDlg.add(intro);	
		aboutDlg.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);
		aboutDlg.addWindowListener(new WindowAdapter(){
			public void windowClosing(WindowEvent e){
				aboutDlg.dispose();
			}
		});
		aboutDlg.setSize(300, 100);
		aboutDlg.setAlwaysOnTop(true);
		aboutDlg.setLocationRelativeTo(null);
		aboutDlg.setModal(true);
		aboutDlg.setVisible(true);
	}

}

⌨️ 快捷键说明

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