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

加入VIP,免费下载
 

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

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

下载须知

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

版权提示 | 免责声明

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

JAVA学生管理系统.docx

1、JAVA学生管理系统 JAVA学生管理系统编译提示(1)有使用其他可视化Java编程工具经验的用户也可以利用这些软件已经携带的JDK。例如从“控制面板”中通过【系统】|【高级】|【环境变量】,针对JBuilder8设置环境变量,即把Path路径设置为C:JBuilder8jdk1.4bin,然后将每章“源程序”目录之中的内容保存在例如C:temp目录中,然后即可在命令提示符窗口中切换到C:temp并使用javac classpath . *.java命令进行编译(其中-classpath用来告诉编译器用户Java文件的路径,“ . ”表示*.java文件的路径在当前目录位置,注意点的前后均有一

2、个空格)。经过编译产生*.class文件后,在C:temp提示符下使用java classpath . * 命令即可运行程序(其中-classpath用来告诉编译器用户类文件的路径,“ . ”表示*.class文件的路径在当前目录位置,注意点的前后均有一个空格。“*”为不包括扩展名的类文件名)。(2)上述方法对于直接安装的JDK 1.5亦完全适用。(3)也可以象书中介绍的那样,在使用javac命令之前使用set classpath=c:temp设置类路径(等号前后不能有空格),然后即可直接使用javac *.java编译命令和java *运行命令。(4)但是应注意,在使用JDK 1.4时,个别

3、程序可能会无法正常编译运行(因JDK 1.5的编程方式略有变化)。所以应首选JDK 1.5。(5)与在“环境变量”对话框中设置类路径相比,在命令提示符窗口中设置类路径是比较稳妥的方法。因为用户存放程序代码的目录位置是根据内容不同而随时确定的。此外您可能会发现“环境变量”对话框中的ClassPath设置在有些情况下毫无作用。AddCourseInfo.javaimport java.awt.event.*;import java.awt.*;import javax.swing.*;/* 课程信息管理模块* 添加新的课程信息*/public class AddCourseInfo extends

4、 CourseInfoCrsBean getCnum = new CrsBean();public AddCourseInfo() this.setTitle(添加课程信息);this.setResizable(false);cNum.setEditable(false);cNum.setText(+getCnum.getCrsId();cName.setEditable(true);cTeacher.setEditable(true);cType.setEditable(true);cTime.setEditable(true);cPlace.setEditable(true);/设置运行位

5、置,使对话框居中Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();this.setLocation( (int) (screenSize.width - 400) / 2 ,(int) (screenSize.height - 300) / 2 +45);public void downInit()addInfo.setText(增加);addInfo.setFont(new Font(Dialog,0,12);downPanel.add(addInfo);clearInfo.setText(清空);clear

6、Info.setFont(new Font(Dialog,0,12);downPanel.add(clearInfo);eixtInfo.setText(退出);eixtInfo.setFont(new Font(Dialog,0,12); * 事件处理 */public void actionPerformed(ActionEvent e) Object obj = e.getSource();if (obj = eixtInfo) /退出this.dispose();else if (obj = addInfo) /增加cNum.setEnabled(false);cName.setEdi

7、table(false);cTeacher.setEditable(false);cType.setEditable(false);cTime.setEditable(false);cPlace.setEditable(false);/PaddInfo.setEnabled(false); clearInfo.setEnabled(false); eixtInfo.setEnabled(false);CrsBean addCrs = new CrsBean();addCrs.crsAdd(cName.getText(), cTeacher.getText(), cPlace.getText()

8、, cType.getText(), cTime.getText();this.dispose();AddCourseInfo aci = new AddCourseInfo();aci.downInit();aci.pack();aci.setVisible(true);this.dispose();else if (obj = clearInfo) /清空setNull();cNum.setText(+getCnum.getCrsId();543 JAVA学生管理系统AddGradeInfo.javaimport java.awt.event.*;import java.awt.*;imp

9、ort javax.swing.*; /* 成绩信息管理模块* 添加新的成绩信息*/public class AddGradeInfo extends GradeInfo implements ActionListenerpublic AddGradeInfo() this.setTitle(添加成绩信息);this.setResizable(false);/设置运行位置,使对话框居中Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();this.setLocation( (int) (screenSize.wid

10、th - 400) / 2 ,(int) (screenSize.height - 300) / 2 +45);public void downInit()addInfo.setText(增加);addInfo.setFont(new Font(Dialog,0,12);downPanel.add(addInfo);eixtInfo.setText(退出);eixtInfo.setFont(new Font(Dialog,0,12);downPanel.add(eixtInfo);this.contentPane.add(downPanel,BorderLayout.SOUTH);sNum.a

11、ddActionListener(this);addInfo.addActionListener(this);eixtInfo.addActionListener(this);/* * 事件处理 */public void actionPerformed(ActionEvent e) Object obj = e.getSource();if (obj = addInfo) /增加cNum.setEnabled(false);cName.setEditable(false);cTeacher.setEditable(false);Grade.setEditable(false);sNum.se

12、tEditable(false);sName.setEditable(false);/P 口的位置Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();this.setLocation(screenSize.width - 400) / 2, (screenSize.height - 300) / 2 + 45); public void downInit()addInfo.setText(增加);addInfo.setFont(new Font(Dialog,0,12);downPanel.add(addInfo

13、);clearInfo.setText(清空);clearInfo.setFont(new Font(Dialog,0,12);downPanel.add(clearInfo);eixtInfo.setText(退出);eixtInfo.setFont(new Font(Dialog,0,12);downPanel.add(eixtInfo);/添加事件侦听/* * 事件处理 */public void actionPerformed(ActionEvent e) Object obj = e.getSource();if (obj = eixtInfo) /退出this.dispose();

14、else if (obj = addInfo) /增加sNum.setEnabled(false);sName.setEnabled(false);sSex.setEnabled(false);sSethnic.setEnabled(false);sBirth.setEnabled(false);sYear.setEnabled(false);sMajor.setEnabled(false);sCollege.setEnabled(false);sHome.setEnabled(false);addInfo.setEnabled(false);clearInfo.setEnabled(fals

15、e);eixtInfo.setEnabled(false);StuBean addStu = new StuBean();addStu.stuAdd(sName.getText(), sSex.getText(), sBirth.getText(), sHome.getText(), sSethnic.getText(), sYear.getText(), sMajor.getText(), sCollege.getText();this.dispose();AddStuInfo asi = new AddStuInfo();asi.downInit();asi.pack();asi.setV

16、isible(true);else if (obj = clearInfo) /清空setNull();sNum.setText(+getSnum.getStuId(); JAVA学生管理系统import javax.swing.*;import java.awt.*;import java.awt.event.*;import .*; /* 课程信息综合管理类* 提供主界面,供其他类继承*/public class CourseInfo extends JFrame implements ActionListenerContainer contentPane;JPanel centerPan

17、el = new JPanel();JPanel upPanel = new JPanel();JPanel downPanel = new JPanel();/框架的大小Dimension faceSize = new Dimension(800, 500);JLabel jLabel1 = new JLabel();JLabel jLabel2 = new JLabel();JLabel jLabel3 = new JLabel();JLabel jLabel4 = new JLabel();JLabel jLabel5 = new JLabel();JLabel jLabel6 = ne

18、w JLabel();JTextField cNum = new JTextField(15);JTextField cName = new JTextField(15);JTextField cTeacher = new JTextField(15);JTextField cType = new JTextField(15);JTextField cTime = new JTextField(15);JTextField cPlace = new JTextField(15);JButton searchInfo = new JButton();JButton addInfo = new J

19、Button();JButton modifyInfo = new JButton();JButton deleteInfo = new JButton();JButton clearInfo = new JButton();JButton saveInfo = new JButton();JButton eixtInfo = new JButton();GridBagLayout girdBag = new GridBagLayout();GridBagConstraints girdBagCon;public CourseInfo() this.setSize(faceSize);/设置标

20、题this.setTitle(课程综合信息管理); this.setResizable(false);/设置程序图标this.setIconImage(getImage(icon.gif);tryInit();catch(Exceptione) e.printStackTrace();public void Init() throws Exception contentPane = this.getContentPane();contentPane.setLayout(new BorderLayout();/中部面板的布局centerPanel.setLayout(girdBag);jLabe

21、l1.setText(课程编码:);jLabel1.setFont(new Font(Dialog,0,12);girdBagCon = new GridBagConstraints();girdBagCon.gridx = 0;girdBagCon.gridy = 0;girdBagCon.insets = new Insets(10,10,10,1);girdBag.setConstraints(jLabel1,girdBagCon);centerPanel.add(jLabel1); girdBagCon = new GridBagConstraints();girdBagCon.gri

22、dx = 1;girdBagCon.gridy = 0;girdBagCon.insets = new Insets(10,1,10,15);girdBag.setConstraints(cNum,girdBagCon);centerPanel.add(cNum);jLabel2.setText(课程名称:);jLabel2.setFont(new Font(Dialog,0,12);girdBagCon = new GridBagConstraints();girdBagCon.gridx = 2;girdBagCon.gridy = 0;girdBagCon.insets = new In

23、sets(10,15,10,1);girdBag.setConstraints(jLabel2,girdBagCon);centerPanel.add(jLabel2);girdBagCon = new GridBagConstraints();girdBagCon.gridx = 3;girdBagCon.gridy = 0;girdBagCon.insets = new Insets(10,1,10,10);girdBag.setConstraints(cName,girdBagCon);centerPanel.add(cName);jLabel3.setText(授课老师:);jLabe

24、l3.setFont(new Font(Dialog,0,12);girdBagCon = new GridBagConstraints();girdBagCon.gridx = 0;girdBagCon.gridy = 1;girdBagCon.insets = new Insets(10,10,10,1);girdBag.setConstraints(jLabel3,girdBagCon);centerPanel.add(jLabel3);girdBagCon = new GridBagConstraints();girdBagCon.gridx = 1;girdBagCon.gridy

25、= 1;girdBagCon.insets = new Insets(10,1,10,15);girdBag.setConstraints(cTeacher,girdBagCon);centerPanel.add(cTeacher);jLabel4.setText(课程类别:);jLabel4.setFont(new Font(Dialog,0,12);girdBagCon = new GridBagConstraints();girdBagCon.gridx = 2;girdBagCon.gridy = 1;girdBagCon.insets = new Insets(10,15,10,1)

26、;girdBag.setConstraints(jLabel4,girdBagCon);centerPanel.add(jLabel4);girdBagCon = new GridBagConstraints();girdBagCon.gridx = 3;girdBagCon.gridy = 1;girdBagCon.insets = new Insets(10,1,10,10);girdBag.setConstraints(cType,girdBagCon);centerPanel.add(cType);jLabel5.setText(上课时间:);jLabel5.setFont(new F

27、ont(Dialog,0,12);girdBagCon = new GridBagConstraints();girdBagCon.gridx = 0;girdBagCon.gridy = 2;girdBagCon.insets = new Insets(10,10,10,1);girdBag.setConstraints(jLabel5,girdBagCon);centerPanel.add(jLabel5);girdBagCon = new GridBagConstraints();girdBagCon.gridx = 1;girdBagCon.gridy = 2;girdBagCon.i

28、nsets = new Insets(10,1,10,15);girdBag.setConstraints(cTime,girdBagCon);centerPanel.add(cTime);jLabel6.setText(上课地点:);jLabel6.setFont(new Font(Dialog,0,12);girdBagCon = new GridBagConstraints();girdBagCon.gridx = 2;girdBagCon.gridy = 2;girdBagCon.insets = new Insets(10,15,10,1);girdBag.setConstraints(jLabel6,girdBagCon);centerPanel.add(jLabel6);girdBagCon = new GridBagConstraints();girdBagCon.gridx = 3;girdBagCon.insets = new Insets(10,1,10,10);girdBag.setConstraints(cPlace,girdBagCon);centerPanel.add(cPla

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

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