aboutframe.java

来自「图书管理系统的设计与实现」· Java 代码 · 共 102 行

JAVA
102
字号
package newLibrary;

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

class AboutFrame extends JFrame
{
	private JPanel ContentPane;
	private JLabel about1 = new JLabel();		//输出“欢迎使用本系统”文本		
	private JLabel about2 = new JLabel();		//输出“Five-710”文本
	
	private JLabel student1 = new JLabel();
	private JLabel student2 = new JLabel();
	private JLabel student3 = new JLabel();
	private JLabel student4 = new JLabel();
	private JLabel student5 = new JLabel();
	
	
	public AboutFrame() 
	{		
		ContentPane = (JPanel)this.getContentPane();
	    ContentPane.setLayout(null);
	    this.setTitle("★图书管理系统★");
	    this.setBounds(300,200,450,350);
	    ContentPane.setBackground(Color.LIGHT_GRAY); 
	    
	    about1.setText("欢迎使用本系统");
	    about1.setHorizontalAlignment(JLabel.CENTER);//设置整个标签的水平对齐方式(居中)
	    about1.setFont(new Font("Dialog", 1, 30));//设置字体大小
	    about1.setBounds(new Rectangle(70, 30, 265, 40));
	    about1.setVisible(true);
	    about1.setForeground(Color.black);
	    
	    about2.setText("Five-710  <Copyright (c) 2007>");
	    about2.setHorizontalAlignment(JLabel.CENTER);//设置整个标签的水平对齐方式(居中)
	    about2.setFont(new Font("Dialog", 1, 14));
	    about2.setBounds(new Rectangle(60, 250, 300, 30));
	    about2.setVisible(true);
	    about2.setForeground(Color.black);	   
	    
	    student1.setText("DY0706101 刘 炫");
	    student1.setHorizontalAlignment(JLabel.CENTER);//设置整个标签的水平对齐方式(居中)
	    student1.setFont(new Font("Dialog", 1, 16));
	    student1.setBounds(new Rectangle(95, 85, 200, 50));
	    student1.setVisible(true);
	    student1.setForeground(Color.gray);
	    
	    student2.setText("DY0706102 艾 伟");
	    student2.setHorizontalAlignment(JLabel.CENTER);//设置整个标签的水平对齐方式(居中)
	    student2.setFont(new Font("Dialog", 1, 16));
	    student2.setBounds(new Rectangle(95, 105, 200, 50));
	    student2.setVisible(true);
	    student2.setForeground(Color.gray);
	    
	    student3.setText("DY0706103 陈 磊");
	    student3.setHorizontalAlignment(JLabel.CENTER);//设置整个标签的水平对齐方式(居中)
	    student3.setFont(new Font("Dialog", 1, 16));
	    student3.setBounds(new Rectangle(95, 125, 200, 50));
	    student3.setVisible(true);
	    student3.setForeground(Color.gray);
	    
	    student4.setText("DY0706104 田 隆");
	    student4.setHorizontalAlignment(JLabel.CENTER);//设置整个标签的水平对齐方式(居中)
	    student4.setFont(new Font("Dialog", 1, 16));
	    student4.setBounds(new Rectangle(95, 145, 200, 50));
	    student4.setVisible(true);
	    student4.setForeground(Color.GRAY);
	    
	    student5.setText("DY0706105 饶 路");
	    student5.setHorizontalAlignment(JLabel.CENTER);//设置整个标签的水平对齐方式(居中)
	    student5.setFont(new Font("Dialog", 1, 16));
	    student5.setBounds(new Rectangle(95, 165, 200, 50));
	    student5.setVisible(true);
	    student5.setForeground(Color.gray);
	    
	    	    
	    ContentPane.add(about1);
		ContentPane.add(about2);
		ContentPane.add(student1);
		ContentPane.add(student2);
		ContentPane.add(student3);
		ContentPane.add(student4);
		ContentPane.add(student5);
		
		
		this.setVisible(true);		
	}
	
	public static void main(String args[])
	{
		new AboutFrame();
	}  

	
}

⌨️ 快捷键说明

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