学生基本信息管理系统个人博客

团队课程设计链接

http://www.cnblogs.com/ll321/p/7067598.html

个人负责模块

负责部分界面设计,处理代码;

处理部分数据库数据。

自己的代码提交记录截图

自己负责模块或任务详细说明

数据库数据删除(在删除界面把数据库数据删除)

package database;

import java.sql.SQLException;

public class DELETE {
public static String[][] delete(String name){
String str ="delete from students where name="+"'"+name+"'"+";";
String[][] strs = new String[100][8];
try{
DBUtil.exec(str); }catch (ClassNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return strs; } }

图形界面设计和处理

1.搜索界面设计(把数据库的数据输送到图形界面)

public SearchJFrame() {
initComponents();
}
private void Button1ActionPerformed(java.awt.event.ActionEvent evt) {
String name = TextField1.getText().trim();
if(name.length()==0){
JOptionPane.showMessageDialog(null,"输入不能为空!");
}
else{
String[][] strs = SEARCH.serach(name);
for (int i = 0; i < 10; i++) {
for (int j = 0; j < 8; j++) {
System.out.print(strs[i][j] + " ");
}
System.out.println();
}
ImformationJFrame ImformationJFrame = new ImformationJFrame(strs);
ImformationJFrame.setVisible(true);
this.setVisible(false);
}
}
private void Button2ActionPerformed(java.awt.event.ActionEvent evt) {
MainJFrame MainJFrame = new MainJFrame();
MainJFrame.setVisible(true);
this.setVisible(false);
}
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(SearchJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(SearchJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(SearchJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(SearchJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
}



2.添加界面设计(把输入的数据输送到数据库)

public class AddJFrame extends javax.swing.JFrame {
public AddJFrame() {
initComponents();
}
private void initComponents() {
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
AddButton.setText("添加");
AddButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
try {
AddButtonActionPerformed(evt);
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
});
Button2.setText("返回");
Button2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
Button2ActionPerformed(evt);
}
});
pack();
}
private void AddButtonActionPerformed(java.awt.event.ActionEvent evt) throws SQLException {
String number = TextField1.getText().trim();
String name = TextField2.getText().trim();
String gender = TextField3.getText().trim();
String birthdate = TextField4.getText().trim();
String politics = TextField5.getText().trim();
String address = TextField6.getText().trim();
String telephone = TextField7.getText().trim();
String dormitory = TextField8.getText().trim();
if(number.length()==0||name.length()==0||gender.length()==0||birthdate.length()==0||politics.length()==0||address.length()==0||telephone.length()==0||dormitory.length()==0){
JOptionPane.showMessageDialog(null, "有数据为空!!");
}
else{
ADD.add(number, name, gender, birthdate, politics, address, telephone, dormitory);
JOptionPane.showMessageDialog(null, "添加成功!"); }
}
private void Button2ActionPerformed(java.awt.event.ActionEvent evt) {
MainJFrame MainJFrame = new MainJFrame();
MainJFrame.setVisible(true);
this.setVisible(false);
}
public static void main(String args[]) {
try {
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(AddJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(AddJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(AddJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(AddJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new AddJFrame().setVisible(true);
}
});
} }



3.删除界面设计(将数据库的数据删除)

private void Button2ActionPerformed(java.awt.event.ActionEvent evt) {
MainJFrame MainJFrame = new MainJFrame();
MainJFrame.setVisible(true);
this.setVisible(false);
} private void Button1ActionPerformed(java.awt.event.ActionEvent evt) {
String number = TextField1.getText().trim();
String name = TextField2.getText().trim();
if(name.length()==0&&number.length()==0){
JOptionPane.showMessageDialog(null,"输入不能为空!" );
}
else{
database.DELETE.delete(name); }
}
public static void main(String args[]) {
try {
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(DeleteJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(DeleteJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(DeleteJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(DeleteJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new DeleteJFrame().setVisible(true);
}
});
}

4.修改界面设计(修改数据库的数据内容)

    private void Button1ActionPerformed(java.awt.event.ActionEvent evt) {

      String number = TextField1.getText().trim();
String name = TextField2.getText().trim();
String gender = TextField3.getText().trim();
String birthdate = TextField4.getText().trim();
String politics = TextField5.getText().trim();
String address = TextField6.getText().trim();
String telephone = TextField7.getText().trim();
String dormitory = TextField8.getText().trim();
CHANGE.change(number,name,gender, birthdate, politics, address, telephone, dormitory);
} private void Button2ActionPerformed(java.awt.event.ActionEvent evt) {
MainJFrame MainJFrame = new MainJFrame();
MainJFrame.setVisible(true);
this.setVisible(false);
} public static void main(String args[]) {
try {
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(ChangeJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(ChangeJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(ChangeJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(ChangeJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new ChangeJFrame().setVisible(true);
}
});
}





课程设计感想

通过这次的课程设计,我认识到了自己的不足之处,对于一部分知识掌握的还不是很好,还有很多的欠缺之处,需要自己不断的改进。而且在这次课设的过程中,大大地提升了对net beans 和数据库的使用熟练度,有了很大收获。

Java课程设计 学生基本信息管理个人博客的更多相关文章

  1. Java课程设计 学生基本信息管理系统 团队博客

    学生基本信息管理系统团队博客 项目git地址 https://git.oschina.net/Java_goddess/kechengsheji 项目git提交记录截图 项目功能架构图与主要功能流程图 ...

  2. java课程设计--猜数字(团队博客)

    java课程设计--猜数字(团队博客) 1.团队名称以及团队成员介绍 团队名称:cz 团队成员:陈伟泽,詹昌锦 团队照片: 2.项目git地址 http://git.oschina.net/Devil ...

  3. JAVA课程设计——团队(&个人)博客

    JAVA课程设计--团队(&个人)博客 1. 团队名称.团队成员介绍(需要有照片) 团队名称:是独立小分队啦 团队成员介绍:包梦榕 网络1513 201521123068 2. 项目git地址 ...

  4. Java课程设计——学生基本信息管理

    1.团队名称.团队成员介绍 团队名称:学生基本信息管理设计小组 团队成员:花雨芸(组长)--负责管理界面的编写 丁蓉(组员)--负责登陆的设计编写 2.项目git地址 https://git.osch ...

  5. Java课程设计-学生基本信息管理 201521123036

    团队课程设计博客链接 团队博客链接 个人负责模块或任务说明 个人负责模块 任务说明 用户登录,注册 登录,注册,判断用户是否存在,添加用户 学生信息管理菜单 按钮,跳转相应界面,退出程序 学生信息添加 ...

  6. Java课程设计 - 学生基本信息管理

    团队名称.团队成员介绍(需要有照片) 团队名称:此艺兴非彼艺兴 团队成员: 王兴:女,积极上进 曾艺佳:女,积极上进 项目git地址 StudentManage项目 项目git提交记录截图(要体现出每 ...

  7. Java课程设计 购物车系统(个人博客) 201521123052 蓝锦明

    1. 团队课程设计博客链接 课程设计团队博客 2. 个人负责模块或任务说明 (1)制作图形菜单引导界面 (2)定义各获取和输出类函数 3. 自己的代码提交记录截图 4. 自己负责模块或任务详细说明 i ...

  8. JAVA课设 学生基本信息管理 团队博客

    1.成员 邹其元 网络1512 201521123060 杨钧宇 网络1512 201521123062 2.项目Git地址 团队项目码云地址 //添加截图 3. 项目git提交记录截图(要体现出每个 ...

  9. Java课程设计 猜数游戏个人博客

    1.团队课程设计博客链接 http://www.cnblogs.com/tt1104/p/7064349.html 2.个人负责模块或任务说明 1.成绩排行榜算法的设计: 2.排行榜存放到文件中, 3 ...

随机推荐

  1. Selenium1 Selenium2 WebDriver

    1.Selenium 1 原理 (1).测试用例(Testcase)通过Client Lib的接口向Selenium Server发送Http请求,要求和Selenium Server建立连接. 为什 ...

  2. java代理理解

    转载请注明出处:http://www.cnblogs.com/zhangcaiwang/p/6247755.html 代理是一种类,编译器编译完成之后是以$Proxy开头. 初始化代理的时候需要类加载 ...

  3. 将本地sql文件导入到mysql中

    cmd命令操作:先创建一个同名数据库,然后通过source导入sql文件 1.启动mysql 2.mysql -uroot -p 输入密码运行mysql 3.创建一个同名数据库 create data ...

  4. 【JSP 标签】选择判断c:choose

    在JSP页面中对 根据一个属性的多个可能的值进行相应的输出 <%@ page language="java" contentType="text/html; cha ...

  5. mysql简单主从复制(一)

    MYSQL简单主从复制 master:172.25.44.1 slave:172.25.44.2 mysql5.7安装 master和slave均操作 准备rpm包:mysql-5.7.17-1.el ...

  6. Java GUI学习心得

    虽然GUI的应用已经不是特别广泛了,但是如果了解一点,可以做些自己想要的工具,最近做了一个工具(是什么就不提了),当然碰到很多的问题,都意义解决了,现在分享出来. 1.关于窗体面板的显示问题 可能会遇 ...

  7. python基础教程(十)

    魔法方法.属性 ------------------------ 准备工作 为了确保类是新型类,应该把 _metaclass_=type 入到你的模块的最开始. class NewType(Objec ...

  8. 模仿Spring实现注解注入

    写这个极其蛋疼,我一直在想我们用SSM写项目时,写Service和Controller的时候,会给Service和Controller私有属性,比如Service需要dao,Controller需要S ...

  9. HDU 6149 Valley Numer II 状压DP

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6149 题意:中文题目 解法:状压DP,dp[i][j]代表前i个低点,当前高点状态为j的方案数,然后枚 ...

  10. jmeter系列------参数关联

    接口请求中的一个变量需要用上一个接口道服务器返回响应的动态值(上个请求). 遇到这样的情况,我们就需要用到关联 例如用户A发表了一个一条微信朋友圈,用户B想对这条朋友圈进行评论,就需要先获取到这个朋友 ...