java学生管理系统

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

/**

*

Title:

*

*

Description:

*

*

Copyright: Copyright (c) 2008

*

*

Company:

*

* @author not attributable

* @version 1.0

*/

public class Student {

public String StudentNo;//定义学号

public String StudentName;//定义姓名

public int StudentAge;//年龄

public java.util.Date StudentSchoolDate = null;//入学时间

public boolean StudentSex;//性别

public String StudentZZMM;//政治面貌

public String StudentHobby;//兴趣爱好

public String StudentResume;//个人简历

public Student() {

}

public Student(String StudentNo, String StudentName, int StudentAge, java.util.Date StudentSchoolDate, boolean StudentSex, String StudentZZMM, String StudentHobby,

String StudentResume) {

this.StudentNo = StudentNo;

this.StudentName = StudentName;

this.StudentAge = StudentAge;

this.StudentSchoolDate = StudentSchoolDate;

this.StudentSex = StudentSex;

this.StudentZZMM = StudentZZMM;

this.StudentHobby = StudentHobby;

this.StudentResume = StudentResume;

}

}

import javax.swing.*;

import java.awt.Rectangle;

import java.awt.Color;

import java.awt.event.ActionEvent;

import java.awt.event.ActionListener;

import java.util.*;

import java.awt.*;

/**

*

利用HashMap存贮对象

*

*

Description:

*

*

Copyright: Copyright (c) 2008

*

*

Company:

*

* @author not attributable

* @version 1.0

*/

public class StudentManager extends JFrame {

///////定义属性,作为全局变量///////////

String StudentNo = null;

String StudentName = null;

int StudentAge = 0;

java.sql.Date StudentSchoolDate = null;

boolean StudentSex = false;

String StudentZZMM = null;

String StudentHobby = "";

String StudentResume = null;

int index = 0;

java.util.Vector myVector = new Vector(); //创建集合类,将对象添加到集合类中 Student myStudent = new Student();

java.util.HashMap myHashMap = new HashMap();

//////////////////////////////////////

public StudentManager() {

try {

jbInit();

} catch (Exception ex) {

ex.printStackTrace();

}

}

private void jbInit() throws Exception {

this.getContentPane().setLayout(null);

jLabel1.setText("学号:");

jLabel1.setBounds(new Rectangle(25, 32, 42, 15));

jTextField2.setToolTipText("");

jTextField2.setBounds(new Rectangle(255, 30, 98, 29)); jLabel2.setText("姓名:");

jLabel2.setBounds(new Rectangle(206, 35, 42, 15));

jTextField3.setToolTipText("");

jTextField3.setBounds(new Rectangle(82, 78, 77, 30)); jLabel3.setText("年龄:");

jLabel3.setBounds(new Rectangle(22, 83, 42, 15));

jCheckBox3.setText("旅游");

jCheckBox3.setBounds(new Rectangle(238, 176, 57, 23)); jCheckBox4.setText("体育");

jCheckBox4.setBounds(new Rectangle(317, 176, 53, 23)); jLabel7.setText("***********个人简历************");

jLabel7.setBounds(new Rectangle(113, 214, 198, 15)); jLabel8.setText("学生信息");

jLabel8.setBounds(new Rectangle(180, 414, 73, 15));

jButton1.setBounds(new Rectangle(33, 618, 83, 25));

jButton1.setText("添加");

jButton1.addActionListener(new

StudentManager_jButton1_actionAdapter(this));

jButton2.setBounds(new Rectangle(179, 618, 83, 25)); jButton2.setText("查询");

jButton2.addActionListener(new

StudentManager_jButton2_actionAdapter(this));

jButton3.setBounds(new Rectangle(319, 618, 83, 25)); jButton3.setText("浏览");

jButton3.addActionListener(new

StudentManager_jButton3_actionAdapter(this));

jButton4.setBounds(new Rectangle(31, 669, 83, 25));

jButton4.setEnabled(false);

jButton4.setText("修改");

jButton4.addActionListener(new

StudentManager_jButton4_actionAdapter(this));

jButton5.setBounds(new Rectangle(179, 670, 83, 25)); jButton5.setEnabled(false);

jButton5.setText("删除");

jButton5.addActionListener(new

StudentManager_jButton5_actionAdapter(this));

jButton6.setBounds(new Rectangle(316, 671, 83, 25));

相关文档
最新文档