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

📄 xsmis.java

📁 适合学生信息管理系统适用于全国各大民办高校
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import javax.swing.*;
import javax.swing.text.*;
public class Xsmis extends WindowAdapter implements ActionListener
{
	Frame f;
	
	MenuBar mb;
	Menu mxj,mbj,mkc,mcj,mxsxx,mhelp;
	
	List lst0;//学籍管理系统里面的列表框
	Label l1,l2,l3,l4,l5,l6,lt1;//学籍管理系统里面的标签
	TextField tf1,tf2,tf3,tf4,tf5,tf6,tf7,tft1;//学籍管理系统里面的文本行
	Button b1,b2,b3,b4,b5,b6,b7;//学籍管理系统里面的按钮
	Checkbox cb1,cb2;//学籍管理系统里面的单选按钮
	CheckboxGroup cg;//学籍管理系统里面的复选框组
	
	List lst1;  //班级管理系统里面的列表框
	Label l21,l22,l23,lt2;//班级管理系统里面的标签
	TextField tf21,tf22,tf23,tft2; //班级管理系统里面的文本行
	Button b21,b22,b23,b24,b25,b26; //班级管理系统里面的按钮
	
	List lst2;  //课程设置系统的实现中的列表框
	Label l31,l32,l33,lt3;//课程设置系统的实现中的标签
	TextField tf31,tf32,tf33,tft3;//课程设置系统的实现中的文本行
	Button b31,b32,b33,b34,b35,b36;//课程设置系统的实现中的按钮
	
	List lst3;  //成绩管理系统的实现中的列表框
	Label l41,l42,l43,lt4;//成绩管理系统的实现中的标签
	TextField tf41,tf42,tf43,tft4;//成绩管理系统的实现中的文本行
	Button b41,b42,b43,b44,b45,b46;//成绩管理系统的实现中的按钮
	
	List lst4;//帮助信息的实现中的列表框
	
	List lst5;//学生信息查询实现中的列表框
	Label l61,l62,l63,l64;//学生信息查询实现中的标签
	TextField tf61,tf62;//学生信息查询实现中的文本行
	Button b61,b62,b63,b64;//学生信息查询实现中的按钮
	
	
	Panel p1,p21,p31,p41,p61;
	
	Dialog dxj1,dbj1,dkc1,dcj1,dhelp,dxsxx;
	
	int row1=0,row2=0,row3=0,row4=0;
	
	FileDialog fd0;//学籍管理
	File file0=null;
	
	FileDialog fd1;//班级管理
	File file1=null;
	
	FileDialog fd2;//课程设计
	File file2=null;
	
	FileDialog fd3;//成绩管理
	File file3=null;
	
	FileDialog fd6;//信息查询
	File file6=null;
	
	void display()
	{
		setf();
		
		setf_face();
	}
	
	void setf()
	{
		f=new Frame("              学生信息管理系统");
		f.setLocation(350,250);
		f.setSize(400,250);
		f.setBackground(Color.orange);
		f.setVisible(true);
		
		String strstr1=" 欢迎进入学生信息管理系统";
		Label l1=new Label(strstr1);
		l1.setFont(new Font(strstr1,15,30));
		l1.setForeground(Color.red);
		String strstr2="                                                                   计算机与数理学院       袁渊";
		Label l2=new Label(strstr2);
		l2.setForeground(Color.magenta);
		
		f.add(l1);
		f.add(l2,"South");
	    f.addWindowListener(new WindowAdapter()
		{
			public void windowClosing(WindowEvent e)
			{
				System.exit(0);
			}
		}
		);
		
	}
	
	void setf_face() 
	{
		mb=new MenuBar();
		f.setMenuBar(mb);
		mxj=new Menu("学籍管理");
		mbj=new Menu("班级管理");
		mkc=new Menu("课程设置");
		mcj=new Menu("成绩管理");
		mxsxx=new Menu("学生信息查询");
		mhelp=new Menu("帮助");
		
		//学籍管理的实现
		MenuItem m11=new MenuItem("新生入学");
		MenuItem m12=new MenuItem("退出系统");
		mxj.add(m11);
		mxj.add(m12);
		//进入新生学籍加入界面
		dxj1=new Dialog(f,"                  新生加入学籍",true);
		dxj1.setSize(450,250);
		dxj1.setLocation(200,300);
		dxj1.setLayout(new GridLayout(1,2));
		dxj1.setResizable(false);
		
		
		lst0=new List(20);
		l1=new Label("             姓名");
		//l2=new Label("姓名.性别.院系.生日.籍贯.生源");
		l3=new Label("             院系");
		l4=new Label("             生日");
		l5=new Label("             籍贯");
		l6=new Label("         新生学号");
		lt1=new Label("记录添加学生人数");
		
		cg=new CheckboxGroup();
		cb1=new Checkbox("male  ",cg,true);
		cb2=new Checkbox("female",cg,false);
		
		tf1=new TextField(30);
		tf2=new TextField(30);
		tf3=new TextField(30);
		tf4=new TextField(30);
		tf5=new TextField(30);
		tf6=new TextField(30);
		open1();
	    tft1=new TextField(""+row1);
		
		b1=new Button("添加 ");
		b2=new Button("保存 ");
		b3=new Button("打开 ");
		b4=new Button("退出 ");
		b5=new Button("删除 ");
		b6=new Button("修改 ");
		
		b1.setForeground(Color.magenta);
		b2.setForeground(Color.magenta);
		b3.setForeground(Color.magenta);
		b4.setForeground(Color.magenta);
		b5.setForeground(Color.magenta);
		b6.setForeground(Color.magenta);
			
		p1=new Panel();
		
		lst0.setForeground(Color.blue);	
		//lst0.setBackground(Color.);	
		dxj1.add(lst0);
		p1.setBackground(Color.lightGray);
		p1.setLayout(new GridLayout(10,1));
		
		p1.add(l6);p1.add(tf3);
		p1.add(l1);p1.add(tf1);
		p1.add(cb1);p1.add(cb2);
		p1.add(l4);p1.add(tf4);
		p1.add(l5);p1.add(tf5);
		p1.add(l3);p1.add(tf6);
		p1.add(lt1);p1.add(tft1);
		p1.add(b1);p1.add(b2);
		p1.add(b5);p1.add(b6);
		p1.add(b3);p1.add(b4);
		
		
		b1.addActionListener(this);
		b2.addActionListener(this);
		b3.addActionListener(this);
		b4.addActionListener(this);
		b5.addActionListener(this);
		b6.addActionListener(this);
		
		dxj1.add(p1);
		dxj1.addWindowListener(new WindowAdapter()
		        {
			        public void windowClosing(WindowEvent e)
			        {
				      dxj1.setVisible(false);
			        }
		         }
		         );	
		mxj.addActionListener(this);
		
		//班级管理的实现如下
		MenuItem m21=new MenuItem("班级信息加入");
		MenuItem m22=new MenuItem("退出系统");
		mbj.add(m21);
		mbj.add(m22);
		
		dbj1=new Dialog(f,"                  班级信息加入",true);
		dbj1.setSize(450,250);
		dbj1.setLocation(510,200);
		dbj1.setBackground(Color.lightGray);
		dbj1.setLayout(new GridLayout(1,2));
		dbj1.setResizable(false);
		
		lst1=new List(20);
		l21=new Label("      学号");
		l22=new Label("      所属年级");
		l23=new Label("      所在班级");
		lt2=new Label("记录班级信息个数");
		
		tf21=new TextField();
		tf22=new TextField();
		tf23=new TextField();
		open2();
		tft2=new TextField(""+row2);
		
		b21=new Button("添加  ");
		b22=new Button("保存  ");
		b23=new Button("打开  ");
		b24=new Button("退出  ");
		b25=new Button("删除  ");
		b26=new Button("修改  ");
		
		dbj1.add(lst1);
		p21=new Panel();
		p21.setLayout(new GridLayout(7,1));
		
		p21.add(l21);p21.add(tf21);
		p21.add(l22);p21.add(tf22);
		p21.add(l23);p21.add(tf23);
		p21.add(lt2);p21.add(tft2);
		p21.add(b21);p21.add(b22);
		p21.add(b25);p21.add(b26);
		p21.add(b23);p21.add(b24);
		
		b21.addActionListener(this);
		b22.addActionListener(this);
		b23.addActionListener(this);
		b24.addActionListener(this);
		b25.addActionListener(this);
		b26.addActionListener(this);
		
		dbj1.add(p21);
		dbj1.addWindowListener(new WindowAdapter()
		        {
			        public void windowClosing(WindowEvent e)
			        {
				      dbj1.setVisible(false);
			        }
		         }
		         );	
		mbj.addActionListener(this);
		
		//课程设置实现如下
		MenuItem m31=new MenuItem("进入选课");
		MenuItem m32=new MenuItem("退出系统");
		mkc.add(m31);
		mkc.add(m32);
		
		dkc1=new Dialog(f,"                  选课信息加入",true);
		dkc1.setSize(450,250);
		dkc1.setLocation(510,200);
		dkc1.setLayout(new GridLayout(2,1));
		dkc1.setResizable(false);
		
		lst2=new List(20);
		l31=new Label("      选课人学号");
		l32=new Label("      课程编号");
		l33=new Label("      课程名称");
		lt3=new Label("记录课程信息个数");
		
		tf31=new TextField();
		tf32=new TextField();
		tf33=new TextField();
		open3();
		tft3=new TextField(""+row3);
		
		b31=new Button("添加   ");
		b32=new Button("保存   ");
		b33=new Button("打开   ");
		b34=new Button("退出   ");
		b35=new Button("删除   ");
		b36=new Button("修改   ");
		
		dkc1.add(lst2);
		Panel p31=new Panel();
		p31.setLayout(new GridLayout(7,1));
		p31.setBackground(Color.pink);
		
		p31.add(l31);p31.add(tf31);
		p31.add(l32);p31.add(tf32);
		p31.add(l33);p31.add(tf33);
		p31.add(lt3);p31.add(tft3);
		p31.add(b31);p31.add(b32);
		p31.add(b35);p31.add(b36);
		p31.add(b33);p31.add(b34);
		
		b31.addActionListener(this);
		b32.addActionListener(this);
		b33.addActionListener(this);
		b34.addActionListener(this);
		b35.addActionListener(this);
		b36.addActionListener(this);
		
		dkc1.add(p31);
		dkc1.addWindowListener(new WindowAdapter()
		        {
			        public void windowClosing(WindowEvent e)
			        {
				      dkc1.setVisible(false);
			        }
		         }
		         );	
		mkc.addActionListener(this);
	  //成绩管理系统的实现如下
	    MenuItem m41=new MenuItem("成绩录入");
		MenuItem m42=new MenuItem("退出系统");
		mcj.add(m41);
		mcj.add(m42);	
		
		dcj1=new Dialog(f,"                  成绩信息加入",true);
		dcj1.setSize(450,250);
		dcj1.setLocation(510,200);
		dcj1.setLayout(new GridLayout(2,1));
		dcj1.setResizable(false);
		
		lst3=new List(20);
		l41=new Label("      学号");
		l42=new Label("      课程名称");
		l43=new Label("      成绩");
		lt4=new Label("记录成绩信息个数");
		
		tf41=new TextField();
		tf42=new TextField();
		tf43=new TextField();
		open4();
		tft4=new TextField(""+row4);
		
		b41=new Button("添加    ");
		b42=new Button("保存    ");
		b43=new Button("打开    ");
		b44=new Button("退出    ");
		b45=new Button("删除    ");
		b46=new Button("修改    ");
		
		dcj1.add(lst3);
		p41=new Panel();
		p41.setLayout(new GridLayout(7,1));
		p41.setBackground(Color.pink);
		
		p41.add(l41);p41.add(tf41);
		p41.add(l42);p41.add(tf42);
		p41.add(l43);p41.add(tf43);
		p41.add(lt4);p41.add(tft4);
		p41.add(b41);p41.add(b42);
		p41.add(b45);p41.add(b46);
		p41.add(b43);p41.add(b44);
		
		b41.addActionListener(this);
		b42.addActionListener(this);
		b43.addActionListener(this);
		b44.addActionListener(this);
		b45.addActionListener(this);
		b46.addActionListener(this);

⌨️ 快捷键说明

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