ImageVerifierCode 换一换
格式:DOCX , 页数:52 ,大小:27.71KB ,
资源ID:8636533      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/8636533.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(JAVA设计方案的学生管理系统源代码.docx)为本站会员(b****5)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

JAVA设计方案的学生管理系统源代码.docx

1、JAVA设计方案的学生管理系统源代码/Student_Management_System.java/JHelpTextPanel.javaimport java.awt.*。import java.awt.event.*。import javax.swing.*。import javax.swing.event.*。import java.io.*。/定义帮助文档类class JHelpTextPanel extends JPanelFont newSmallTitleFont=new Font(楷体,Font.BOLD,12)。JTextArea HelpText=new JTextArea

2、()。JHelpTextPanel() setLayout(null)。 setBackground(Color.orange)。 HelpText.setBackground(Color.orange)。 HelpText.setForeground(Color.red)。 HelpText.setFont(newSmallTitleFont)。 HelpText.setBounds(0,0,600,600)。 add(HelpText)。/Student_InforPanel .javaimport java.awt.*。import java.awt.event.*。import jav

3、ax.swing.*。import javax.swing.event.*。import java.io.*。class Student_InforPanel extends JPanel implements ActionListener/四种常用字体的定义Font newTitleFont=new Font(楷体,Font.BOLD,40)。Font newSmallTitleFont=new Font(楷体,Font.BOLD,25)。Font newCommonFont=new Font(宋体,Font.BOLD,20)。Font newSubMenuFont=new Font(宋体,

4、Font.BOLD,15)。Font NewSubMenuFont=new Font(宋体,Font.BOLD,10)。/性别数组定义String os= 男 , 女 。 /定义确认对话框图标ImageIcon thinker=new ImageIcon(ICON/thinker.gif)。 /定义学生信息管理系统面板菜单控件JLabel StudentSno_Clue=new JLabel(学号:)。JLabel StudentName_Clue=new JLabel(姓名:)。JLabel StudentSex_Clue=new JLabel(性别:)。JLabel StudentAge_

5、Clue=new JLabel(年龄:)。JLabel StudentClass_Clue=new JLabel(班级:)。JLabel StudentDept_Clue=new JLabel(系别:)。JTextField StudentSno_Input=new JTextField()。JTextField StudentName_Input=new JTextField()。ComboBoxModel Othermode=new OtherAModel()。JComboBox StudentSex_Input=new JComboBox(Othermode)。JTextField St

6、udentAge_Input=new JTextField()。JTextField StudentClass_Input=new JTextField()。JTextField StudentDept_Input=new JTextField()。JTextArea QueryInforShow=new JTextArea()。 JLabel QueryClue=new JLabel(以下是你要查询的学生信息:)。JButton Add_StudentInformation=new JButton(增加学生信息)。JButton Del_StudentInformation=new JBut

7、ton(删除学生信息)。JButton Query_StudentInformation=new JButton(查询学生信息)。 JButton Modify_StudentInformation=new JButton(修改学生信息)。 /定义变量 int ValidAge。 String SnoOrigin。 Student_InforPanel() setBackground(Color.orange)。QueryInforShow.setBackground(Color.orange)。setLayout(null)。StudentSno_Clue.setBounds(270,120

8、,80,30)。StudentSno_Clue.setFont(newCommonFont)。StudentSno_Input.setBounds(350,120,120,30)。StudentName_Clue.setBounds(270,170,80,30)。StudentName_Clue.setFont(newCommonFont)。StudentName_Input.setBounds(350,170,120,30)。StudentSex_Clue.setBounds(270,220,80,30)。StudentSex_Clue.setFont(newCommonFont)。Stud

9、entSex_Input.setBounds(350,220,120,30)。StudentAge_Clue.setBounds(270,270,80,30)。StudentAge_Clue.setFont(newCommonFont)。StudentAge_Input.setBounds(350,270,120,30)。StudentClass_Clue.setBounds(270,320,80,30)。StudentClass_Clue.setFont(newCommonFont)。StudentClass_Input.setBounds(350,320,120,30)。StudentDe

10、pt_Clue.setBounds(270,370,80,30)。StudentDept_Clue.setFont(newCommonFont)。StudentDept_Input.setBounds(350,370,120,30)。Query_StudentInformation.setBounds(80,120,130,30)。Query_StudentInformation.setFont(newSubMenuFont)。Query_StudentInformation.addActionListener(this)。QueryClue.setBounds(80,180,300,50)。

11、QueryClue.setFont(newSubMenuFont)。 QueryInforShow.setBounds(80,220,530,100)。QueryInforShow.setFont(newSubMenuFont)。Del_StudentInformation.setBounds(80,120,130,30)。Del_StudentInformation.setFont(newSubMenuFont)。Del_StudentInformation.addActionListener(this)。Add_StudentInformation.setBounds(80,170,130

12、,30)。Add_StudentInformation.setFont(newSubMenuFont)。Add_StudentInformation.addActionListener(this)。Modify_StudentInformation.setBounds(80,220,130,30)。Modify_StudentInformation.setBounds(80,220,130,30)。Modify_StudentInformation.setFont(newSubMenuFont)。Modify_StudentInformation.addActionListener(this)

13、。add(StudentSno_Clue)。add(StudentSno_Input)。add(StudentName_Clue)。add(StudentName_Input)。add(StudentSex_Clue)。add(StudentSex_Input)。add(StudentAge_Clue)。add(StudentAge_Input)。 add(StudentClass_Clue)。add(StudentClass_Input)。add(StudentDept_Clue)。add(StudentDept_Input)。add(QueryClue)。add(QueryInforSho

14、w)。add(Add_StudentInformation)。add(Del_StudentInformation)。add(Query_StudentInformation)。 add(Modify_StudentInformation)。public void actionPerformed(ActionEvent e) if(e.getSource()=Add_StudentInformation) if(IsValidAge(StudentAge_Input.getText() String *=(String)StudentSex_Input.getSelectedItem()。 M

15、ainMenu.myDatabase.Add_Database_Information(StudentSno_Input.getText(), StudentName_Input.getText(),*,ValidAge,StudentClass_Input.getText(),StudentDept_Input.getText()。 emptyInput()。 if(e.getSource()=Del_StudentInformation) QueryInforShow.setText()。 if(MainMenu.myDatabase.Query_Database_Information(

16、StudentSno_Input.getText() QueryInforShow.setText(DataBaseControl.temptInformation)。 int result=JOptionPane.showConfirmDialog(null,你确定要删除该生信息吗?,Confirm Message,JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE,thinker)。 if(result=JOptionPane.YES_OPTION) if(MainMenu.myDatabase.Del_Database_Infor

17、mation(StudentSno_Input.getText() JOptionPane.showMessageDialog(null,删除操作成功!,Happy Message,JOptionPane.PLAIN_MESSAGE)。 else JOptionPane.showMessageDialog(null,数据库操作出现异常,删除操作失败!,Error Message,JOptionPane.ERROR_MESSAGE)。 else QueryInforShow.setText(对不起,没有找到你要删除的学生信息.)。 if(e.getSource()=Query_StudentIn

18、formation) QueryInforShow.setText()。 if(MainMenu.myDatabase.Query_Database_Information(StudentSno_Input.getText() QueryInforShow.setText(DataBaseControl.temptInformation)。 else QueryInforShow.setText(对不起,没有你想要查询的学生信息)。 if(e.getSource()=Modify_StudentInformation) if(IsValidAge(StudentAge_Input.getTex

19、t() MainMenu.myDatabase.Modify_Database_Information(SnoOrigin,StudentSno_Input.getText(), StudentName_Input.getText(),ValidAge,StudentClass_Input.getText(),StudentDept_Input.getText()。 public boolean IsValidAge(String StringAge) try ValidAge=Integer.parseInt(StringAge)。catch(NumberFormatException e)

20、 e.printStackTrace()。 return false。if(ValidAge0) return true。else JOptionPane.showMessageDialog(null,你输入的年龄不合实际情况n请重新输入!,WARNING MESSAGE, JOptionPane.WARNING_MESSAGE)。 return false。 class OtherAModel extends DefaultComboBoxModel OtherAModel() for(int i=0。ios.length。i+) addElement(osi)。 public void e

21、mptyInput() StudentSno_Input.setText()。 StudentAge_Input.setText()。 StudentName_Input.setText()。 StudentClass_Input.setText()。 StudentDept_Input.setText()。 public void OnlyShowSno() StudentSno_Clue.setVisible(true)。 StudentSno_Input.setVisible(true)。 StudentSno_Input.setText()。 QueryClue.setVisible(

22、true)。 QueryInforShow.setVisible(true)。 StudentName_Clue.setVisible(false)。 StudentName_Input.setVisible(false)。 StudentSex_Clue.setVisible(false)。 StudentSex_Input.setVisible(false)。 StudentAge_Clue.setVisible(false)。 StudentAge_Input.setVisible(false)。 StudentClass_Clue.setVisible(false)。 StudentC

23、lass_Input.setVisible(false)。 StudentDept_Clue.setVisible(false)。 StudentDept_Input.setVisible(false)。 /显示学生信息的所有面板控件 public void ShowWhole() StudentSno_Clue.setVisible(true)。 StudentSno_Input.setVisible(true)。 StudentSno_Input.setText()。 QueryClue.setVisible(false)。 QueryInforShow.setVisible(false)

24、。 StudentName_Clue.setVisible(true)。 StudentName_Input.setVisible(true)。 StudentName_Input.setText()。 StudentSex_Clue.setVisible(true)。 StudentSex_Input.setVisible(true)。 StudentAge_Clue.setVisible(true)。 StudentAge_Input.setVisible(true)。 StudentAge_Input.setText()。 StudentClass_Clue.setVisible(tru

25、e)。 StudentClass_Input.setVisible(true)。 StudentClass_Input.setText()。 StudentDept_Clue.setVisible(true)。 StudentDept_Input.setVisible(true)。 StudentDept_Input.setText()。 /Student_ScorePanel.javaimport java.awt.*。import java.awt.event.*。import javax.swing.*。import javax.swing.event.*。class Student_S

26、corePanel extends JPanel implements ActionListener/三种常用字体的定义Font newTitleFont=new Font(楷体,Font.BOLD,40)。Font newSmallTitleFont=new Font(楷体,Font.BOLD,25)。Font newCommonFont=new Font(宋体,Font.BOLD,20)。Font newSubMenuFont=new Font(宋体,Font.BOLD,15)。Font NewSubMenuFont=new Font(宋体,Font.BOLD,10)。 /定义确认对话框图

27、标ImageIcon thinker=new ImageIcon(ICON/thinker.gif)。JLabel ScoreSno_Clue=new JLabel(学号:)。JLabel ScoreEnglish_Clue=new JLabel(英语:)。JLabel ScoreSeniorMath_Clue=new JLabel(高数:)。JLabel ScoreC_Clue=new JLabel(C:)。JLabel ScoreVC_Clue=new JLabel(VC:)。JLabel ScoreJAVA_Clue=new JLabel(JAVA:)。JTextField ScoreS

28、no_Input=new JTextField()。JTextField ScoreEnglish_Input=new JTextField()。JTextField ScoreSeniorMath_Input=new JTextField()。JTextField ScoreC_Input=new JTextField()。JTextField ScoreVC_Input=new JTextField()。JTextField ScoreJAVA_Input=new JTextField()。JTextArea ScoreShow=new JTextArea()。JLabel ScoreShowClue=new JLabel(你要查询的学生成绩信息为:)。JButton Add_ScoreInformation=new JButton(增加学生成绩)。JButton Del_ScoreInformation=new JButton(删除学生成绩)。JButton Query_ScoreInformation=new JB

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

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