学生学籍管理系统 含java源代码.docx

上传人:b****5 文档编号:27604643 上传时间:2023-07-03 格式:DOCX 页数:23 大小:87.64KB
下载 相关 举报
学生学籍管理系统 含java源代码.docx_第1页
第1页 / 共23页
学生学籍管理系统 含java源代码.docx_第2页
第2页 / 共23页
学生学籍管理系统 含java源代码.docx_第3页
第3页 / 共23页
学生学籍管理系统 含java源代码.docx_第4页
第4页 / 共23页
学生学籍管理系统 含java源代码.docx_第5页
第5页 / 共23页
点击查看更多>>
下载资源
资源描述

学生学籍管理系统 含java源代码.docx

《学生学籍管理系统 含java源代码.docx》由会员分享,可在线阅读,更多相关《学生学籍管理系统 含java源代码.docx(23页珍藏版)》请在冰豆网上搜索。

学生学籍管理系统 含java源代码.docx

学生学籍管理系统含java源代码

 

学生学籍管理详细设计

 

学号:

____________

姓名:

____________

班级:

____________

 

1、设计题目:

学生学籍管理

二:

设计内容:

设计GUI学生学籍管理界面,用户可以加入学生信息,并对基本信息进行修改,添加,查询,删除。

三:

设计要求:

进行简单的学生信息管理。

四:

总体设计

(1)登陆界面的设计

(2)主窗体的设计

(3)添加学生信息窗体

(4)查询学生信息窗体

(5)修改学生信息窗体

(6)删除学生信息窗体

(7)事件响应的处理

五:

具体设计

(1)程序结构的说明:

A.入口程序:

;

B.登陆界面程序:

;

C.主窗体程序:

;

D.添加信息窗口程序:

;

E.修改信息窗口程序:

;

F.查询信息窗口程序:

;

G.删除信息窗口程序:

;

H.程序数据连接:

;

(2)程序代码及分析说明

A.程序源代码(已提交)

是程序的入口。

使登录窗口位于窗口中间,并且不可改变窗口大小。

是程序的登陆窗体。

输入用户名和密码(用户名和密码在数据库的password表中)点击“进入系统”,然后登陆界面消失;出现要操作的界面(屏幕左上角)。

是添加信息界面。

添加基本信息后,点击“添加信息”按钮,将信息加入xinxi表中。

是修改信息界面。

输入要修改的学号或姓名(两者数其一或全部输入),并输入所有信息,点击“修改信息”按钮(如果数据库中不存在此学号,则弹出对话框“无此学生信息”),若有则修改。

是删除信息界面。

输入要删除的学生的学号,点击“删除信息”按钮,弹出确认删除对话框,即可删除该生信息。

是查询信息界面。

输入要查询的学生学号,点击“信息查询”按钮,在相应的文本区里显示查询的信息。

H:

源代码

;

import.*;

etScreenSize();

DimensionframeSize=();

if>

{

=;

}

if>

{

=;

}

((true);

}

publicstaticvoidmain(String[]args)

{

try{

());

}

catch(Exceptione)

{

();

}

newstudent();

}

}

 

;

publicclassDatabaseConn

{

privatestaticStringuser="";

privatestaticStringpassword="";

privateConnectionconn=null;

privateStatementstmt=null;

privateResultSetrs=null;

static

{

try{("");.

stmt=createStat();

rs=(sql);

returnrs;

}catch(SQLExceptione)

{

returnnull;

}

}

publicvoidclose()

{

try{

if(rs!

=null)

();

if(stmt!

=null)

();

if(conn!

=null)

();

}catch(SQLExceptionex)

{

();

}

}

}

;

import.*;

import.*;

publicclassmainframeextendsJFrameimplementsActionListener

{

staticmainframes;

staticJPanelpan=newJPanel();

staticJLabellabel1=newJLabel("用户");

staticJLabellabel2=newJLabel("密码");

staticJTextFieldtextField1=newJTextField();

staticJPasswordFieldpassword=newJPasswordField();

staticJButtonbutton1=newJButton("进入系统");

staticJRadioButtonradioButton1=newJRadioButton("管理员",true);quals("syc")&&().equals("123")){

interfacb=newinterfac();

();

quals())||"".equals())){

(null,"用户名或密码不能为空");

}else{

(null,"用户名或密码输入有误");

}

}

if())quals("")||().equals(""))

{

(this,"用户名或密码不可为空!

");

}

elseif())

{newinterfac();}

else

{(this,"您的输入有误");}

;

import.*;

publicclassinterfacextendsJFrameimplementsActionListener

{

staticJMenuBarjMenuBar=newJMenuBar();;

import.*;

import.*;

publicclasstjextendsJFrameimplementsActionListener

{

statictjs;

staticJLabellabel1=newJLabel("学号:

");

staticJTextFieldtextField1=newJTextField("");

staticJLabellabel2=newJLabel("姓名:

");

staticJTextFieldtextField2=newJTextField("");

staticJLabellabel3=newJLabel("性别:

");

staticJTextFieldtextField7=newJTextField("");

staticJLabellabel4=newJLabel("出生日期:

");

staticJTextFieldtextField3=newJTextField("");

staticJLabellabel5=newJLabel("政治面貌:

");

staticJTextFieldtextField8=newJTextField("");

staticJLabellabel6=newJLabel("籍贯");

staticJTextFieldtextField4=newJTextField("");

staticJLabellabel7=newJLabel("系别:

");

staticJTextFieldtextField9=newJTextField("");

staticJLabellabel8=newJLabel("专业:

");

staticJTextFieldtextField5=newJTextField("");

staticJButtonbutton1=newJButton("增加");

publictj()

{

("增加学生信息");

(null);

(400,400);

(30,11,51,33);

(86,16,74,22);

(162,11,51,33);

(192,16,44,22);

(241,11,70,33);

(275,15,50,25);

(31,53,55,33);

(86,58,74,22);

(241,53,70,33);

(296,57,72,25);

(163,53,26,33);

(191,58,44,22);

(30,94,50,33);

(86,94,74,22);

(163,94,51,33);

(190,99,178,22);

(25,241,80,33);

(this);

(label1);

(label2);

(label3);

(label4);

(label5);

(label6);

(label7);

(label8);

(textField1);

(textField2);

(textField3);

(textField4);

(textField5);

(textField7);

(textField8);

(textField9);

(button1);

;

(true);

}

publicstaticvoidmain(String[]args)throwsException

{

tja=newtj();

;

}

publicvoidactionPerformed(ActionEvente);

import.*;

import.*;

publicclassxgextendsJFrameimplementsActionListener

{

staticxgs;

staticJLabellabel1=newJLabel("学号:

");

staticJTextFieldtextField1=newJTextField("");

staticJLabellabel2=newJLabel("姓名:

");

staticJTextFieldtextField2=newJTextField("");

staticJLabellabel3=newJLabel("性别:

");

staticJTextFieldtextField7=newJTextField("");

staticJLabellabel4=newJLabel("出生日期:

");

staticJTextFieldtextField3=newJTextField("");

staticJLabellabel5=newJLabel("政治面貌:

");

staticJTextFieldtextField8=newJTextField("");

staticJLabellabel6=newJLabel("籍贯");

staticJTextFieldtextField4=newJTextField("");

staticJLabellabel7=newJLabel("系别:

");

staticJTextFieldtextField9=newJTextField("");

staticJLabellabel8=newJLabel("专业:

");

staticJTextFieldtextField5=newJTextField("");

staticJButtonbutton2=newJButton("修改");

publicxg()

{

("修改学生信息");

(null);

(400,400);

(30,11,51,33);

(86,16,74,22);

(162,11,51,33);

(192,16,44,22);

(241,11,70,33);

(275,15,50,25);

(31,53,55,33);

(86,58,74,22);

(241,53,70,33);

(296,57,72,25);

(163,53,26,33);

(191,58,44,22);

(30,94,50,33);

(86,94,74,22);

(163,94,51,33);

(190,99,178,22);

(115,241,80,33);

(this);

(label1);

(label2);

(label3);

(label4);

(label5);

(label6);

(label7);

(label8);

(textField1);

(textField2);

(textField3);

(textField4);

(textField5);

(textField7);

(textField8);

(textField9);

(button2);

;

(true);

}

publicstaticvoidmain(String[]args)throwsException

{

xga=newxg();

;

}

publicvoidactionPerformed(ActionEvente)rim().equals(""))

{

(this,"学号不可为空!

");

}

elseif())

{

StringupdateSql="updatexinxiset学号='"+()+"',姓名

='"+

()+"',性别='"+()+"',出

生日期='"+

()+"',政治面貌='"+()

+"',籍贯='"+

()+"',系别='"+()+"',专

业='"+

()+"'";

try{

(updateSql);}

catch(SQLExceptionse)

{

(null,"修改成

功");

}

}

}

catch(SQLExceptionse)

{

(s,());

}

}

}

}

;

import.*;

import.*;

publicclassscextendsJFrameimplementsActionListener

{

staticscs;

staticJLabellabel1=newJLabel("学号:

");

staticJTextFieldtextField1=newJTextField("");

staticJLabellabel2=newJLabel("姓名:

");

staticJTextFieldtextField2=newJTextField("");

staticJLabellabel3=newJLabel("性别:

");

staticJTextFieldtextField7=newJTextField("");

staticJLabellabel4=newJLabel("出生日期:

");

staticJTextFieldtextField3=newJTextField("");

staticJLabellabel5=newJLabel("政治面貌:

");

staticJTextFieldtextField8=newJTextField("");

staticJLabellabel6=newJLabel("籍贯");

staticJTextFieldtextField4=newJTextField("");

staticJLabellabel7=newJLabel("系别:

");

staticJTextFieldtextField9=newJTextField("");

staticJLabellabel8=newJLabel("专业:

");

staticJTextFieldtextField5=newJTextField("");

staticJButtonbutton4=newJButton("删除");

publicsc()throwsException

{

("删除学生信息");

(null);

(400,400);

(30,11,51,33);

(86,16,74,22);

(162,11,51,33);

(192,16,44,22);

(241,11,70,33);

(275,15,50,25);

(31,53,55,33);

(86,58,74,22);

(241,53,70,33);

(296,57,72,25);

(163,53,26,33);

(191,58,44,22);

(30,94,50,33);

(86,94,74,22);

(163,94,51,33);

(190,99,178,22);

(295,241,80,33);

(this);

(label1);

(label2);

(label3);

(label4);

(label5);

(label6);

(label7);

(label8);

(textField1);

(textField2);

(textField3);

(textField4);

(textField5);

(textField7);

(textField8);

(textField9);

(button4);

;

(true);

}

publicstaticvoidmain(String[]args)throwsException

{

sca=newsc();

;

}

publicvoidactionPerformed(ActionEvente)rim().equals(""))

{

(this,"学号不可为空!

");

}

elseif())

{

(null,"确定要删除该信息嘛?

\n删除的信息将不能恢复,继续?

","删除确定",;;

import.*;

import.*;

publicclasscxextendsJFrameimplementsActionListener

{

staticcxs;

staticJLabellabel1=newJLabel("学号:

");

staticJTextFieldtextField1=newJTextField("");

staticJLabellabel2=newJLabel("姓名:

");

staticJTextFieldtextField2=newJTextField("");

staticJLabellabel3=newJLabel("性别:

");

staticJTextFieldtextField7=newJTextField("");

staticJLabellabel4=newJLabel("出生日期:

");

staticJTextFieldtextField3=newJTextField("");

staticJLabellabel5=newJLabel("政治面貌:

");

staticJTextFieldtextField8=newJTextField("");

staticJLabellabel6=newJLabel("籍贯");

staticJTextFieldtextField4=newJTextField("");

staticJLabellabel7=newJLabel("系别:

");

staticJTextFieldtextField9=newJTextField("");

staticJLabellabel8=newJLabel("专业:

");

staticJTextFieldtextField5=newJTextField("");

staticJButtonbutton3=newJButton("查询");

publiccx()throwsException

{

("查询学生信息");

(null);

(400,400);

(30,11,51,33);

(86,16,74,22);

(162,11,51,33);

(192,16,44,22);

(241,11,70,33);

(275,15,50,25);

(31,53,55,33);

(86,58,74,22);

(241,53,70,33);

(296,57,72,25);

(163,53,26,33);

(191,58,44,22);

(30,94,50,33);

(86,94,74,22);

(163,94,51,33);

(190,99,178,22);

(205,241,80,33);

(this);

(label1);

(label2);

(label3);

(label4);

(label5);

(label6);

(label7);

(label8);

(textField1);

(textField2);

(textField3);

(textField4);

(textField5);

(textField7);

(textField8);

(textField9);

(button3);

;

(true);

}

publicstaticvoidmain(String[]args)throwsException

{

cxa=newcx();

;

}

publicvoidactionPerformed(ActionEvente)

{

if()==button3)

{

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 表格模板 > 表格类模板

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1