student_look.java

来自「一个关于图书馆管理系统的课程设计」· Java 代码 · 共 58 行

JAVA
58
字号
//学生查管理系统
import javax.swing.*;
import javax.swing.event.*;
import java.awt.*;
import java.awt.event.*;
import java.io.*;
public class student_look extends JFrame implements ActionListener
{
	JButton b1;
	JButton b2;
	JButton b3;
	public  student_look()
	{
	super("学生查看管理系统");
	
	b1=new JButton("学生查询");
	b2=new JButton("修改密码");
	b3=new JButton("      退出      ");
	setLayout(new FlowLayout());
	add(b1);
	add(b2); 
	add(b3);
	b1.addActionListener(this);
	b2.addActionListener(this);
	b3.addActionListener(this);
	}
	public void actionPerformed(ActionEvent et)
	{
		if (et.getSource() == b1){
			dispose();
			student_look1 x=new student_look1();
			x.setVisible(true);
			x.setLocation(300,300);
			x.setSize(350,500);
		}
		else if(et.getSource()==b2){
			dispose();
			student_look2 x=new student_look2();
			x.setVisible(true);
			x.setLocation(300,300);
			x.setSize(350,500);
		}
		else{
			dispose();
			
		}
		 
	}	 
	public static void main(String args[])
	{	student_look x1=new student_look();
		x1.setVisible(true);
		x1.setLocation(300,300);
		x1.setSize(600,600);
	
	}
}
  

⌨️ 快捷键说明

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