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

团队课程设计链接

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. Android绘画板(普通绘画模式和缩放平移绘画模式)

    ScaleSketchPadDemo 项目地址: demo apk体验下载 demo2 apk体验下载 用法: 进入项目根目录:https://github.com/ShaunSheep/ScaleS ...

  2. asp.net 开发 sql server 转 oracle

    前段时间我们公司项目 要把sql server 转oracle 分享一下心得 也记录一下问题 开始我研究了一段时间 然后下载了 oracle 11g 版本 和 PL/SQL(客户端) 和sql ser ...

  3. 如何在.xml中配置Servlet信息

    在编写好servlet文件后需要在web.xml文件下配置servlet,才能使servlet在服务器上运行.基本配置方式如下所示 <context-param> <param-na ...

  4. Nodejs 复制文件/文件夹

    1.使用fs复制文件 使用fs对象的readFileSync,writeFileSync方法进行读写操作复制 cp.js function copyIt(from, to) { fs.writeFil ...

  5. KeepAlived+Nginx实现高可用负载

    一.环境及安装版本: centos6.5.Nginx1.4.7.keepalived1.3.2 虚拟IP 真是IP Nginx端口 主从分配 10.0.90.215 10.0.90.217 80 MA ...

  6. OpenCms JSP 模板开发——创建一个简单的JSP模板

    OpenCms中的JSP模板就是一个普通的JSP页面,在特定的位置使用标签来包含内容,在这个的例子中,我们将要开发一个简单JSP模板,这个模板只是在内容(如<html>.<body& ...

  7. 【Regular Expression】RE分类及案例

    背景知识 正则表达式分为三类:基础正则表达式.扩展正则表达式.Perl正则表达式(Perl内建) 通俗来说,这三个一个比一个强大,支持的规则匹配字符更多 1.匹配IP ip addr | grep - ...

  8. SpringMVC的@RequestParam的解释

    自SpringMVC4.2之后,RequestParam内部有4个参数: 1.String name 2.String value 3.boolean required 4.String defaul ...

  9. private ,friendly,public protected四种修饰符访问权限(从idea代码提示中看出)

    文件一,本类中可以访问全部: package xsf; /** * Created by liwenj on 2017/7/25. */ public class A { private int x= ...

  10. jmeter返回的post data乱码

    通过csv 跑出来的结果 解决方法: 在CSV Data Set Config中将File Encoding设置为GB2312将Allow quoted data 设置为true