package frame;
import javax.swing.JFrame;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;
public class Manager extends JFrame implements ActionListener{
JLabel welcome,option;
JButton student,teacher,research;
Manager(){
init();
}
void init(){
welcome = new JLabel("欢迎您,管理员");
option = new JLabel("请选择");
student=new JButton("研究生管理");
teacher=new JButton("导师信息管理");
research=new JButton("科研项目管理");
student.addActionListener(this);
teacher.addActionListener(this);
research.addActionListener(this);
welcome.setFont(new java.awt.Font("Dialog", 1, 25));
option.setFont(new java.awt.Font("Dialog", 1, 20));
JPanel jp1 = new JPanel();
JPanel jp2 = new JPanel();
JPanel jp3 = new JPanel();
JPanel jp4 = new JPanel();
jp1.setLayout(new BorderLayout());
jp2.setLayout(new FlowLayout());
jp3.setLayout(new FlowLayout());
jp4.setLayout(new FlowLayout());
jp2.add(welcome);
jp3.add(option);
jp4.add(student);
jp4.add(teacher);
jp4.add(research);
jp1.add(jp2,"North");
jp1.add(jp3,"Center");
jp1.add(jp4,"South");
this.add(jp1);
setBounds(200,200,400,300);
setVisible(true);
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
setTitle("管理员跳转页面");
}
public void actionPerformed(ActionEvent e) {
String buttonName = e.getActionCommand();
System.out.println(buttonName);
if(buttonName.equals("研究生管理")){
new Test3();
}
else if(buttonName.equals("导师信息管理")){
new Teacher();
}
else if(buttonName.equals("科研项目管理")){
new Project();
}
}
public static void main(String args[]){
new Manager();
}
}
最近下载更多
微信网友_6267404517216256 LV1
2024年5月1日
李朝磊 LV18
2023年11月18日
夜猫子111 LV2
2023年11月6日
fesfefe LV13
2023年9月19日
xiao小果 LV13
2022年5月24日
18692870445 LV1
2021年12月25日
qianzf LV12
2021年12月23日
尹恒yingying LV18
2021年10月12日
13112360 LV2
2021年8月27日
wodemabu88 LV1
2021年8月1日

最近浏览