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

📄 aboutframe.java

📁 用java2核心类库写的一个学生课程管理系统
💻 JAVA
字号:
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;

public class AboutFrame extends JFrame 
{
    private JPanel content;

    private JTextArea test;
    private JButton okButton;
    
    private static final AboutFrame About = new AboutFrame();

    public static AboutFrame singleAboutFrame()
	{
		return About;
	}

    private AboutFrame()
    {
    	initAboutFrame();
    	ClickActionListener  cal = new ClickActionListener();
    	okButton.addActionListener(cal);
    }

	private void initAboutFrame()
    {
        this.setTitle("关于");
        
    	content = new JPanel();
    	test = new JTextArea("软件名: 学生信息管理系统\n" + 
    		                  "版本号: 1.0\n" +
    		                  "开发者: 李忠义\n" + 
    		                  "联系方式: liranke@sina.com");
    
        okButton = new JButton("确定");

    	test.setBackground(content.getBackground());
    	test.setEditable(false);
 
        content.add(test);
        content.add(okButton);
        content.setLayout(new FlowLayout());
        this.add(content);
        this.setSize(300,300);
        this.setVisible(true);
    }	
 
    class ClickActionListener implements ActionListener  
    {    
	   public void actionPerformed(ActionEvent e)
	   	{
	    	if (e.getActionCommand() == "确定")
	    	{
	    	   System.out.println("kkkkkkkkkkkk");
	    	   About.dispose();
	    	}
	    }
    }
}

⌨️ 快捷键说明

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