云题海 - 专业文章范例文档资料分享平台

当前位置:首页 > 基于Java和Oracle的学生信息管理系统

基于Java和Oracle的学生信息管理系统

  • 62 次阅读
  • 3 次下载
  • 2025/5/2 20:17:50

}

sex=\;

JOptionPane.showMessageDialog(this,\性别不可为空,无法完

成添加!\);

else {

if(man.isSelected()) {

sex=\男\; } else {

sex=\女\; } try { }

catch (ClassNotFoundException ce) { } try {

Connection con =

JOptionPane.showMessageDialog(s,ce.getMessage()); Class.forName(\);

DriverManager.getConnection(\,\\,\);

Statement stmt1 = con.createStatement(); ResultSet rs1 = stmt1.executeQuery(\

STU\);

rs1=stmt1.executeQuery(\ID='\+id+\);

13

if(rs1.next())//如果账号存在则进行添加信息操作 {

if(rs1.getString(\).equals(c)) {

String sql1=\

id=\+id+\;

stmt1.executeUpdate(sql1);

int a = stmt1.executeUpdate(\

message(ID , Name , Sex , Class ,

College)values('\+num.getText()+\+nam.getText()+\+sex+\+clas.getText()+\+scl.getText()+\);

if(a==1) {

JOptionPane.showMessageDialog(s,\信息已

setVisible(false);

成功添加!\);

} else {

JOptionPane.showMessageDialog(s,\信息添 setVisible(true);

加失败!\);

}

}

else {

JOptionPane.showMessageDialog(s,\对不起,添

加失败,密码不正确!\);

}

} else {

14

}

JOptionPane.showMessageDialog(this,\对不起,添 }

rs1.close(); { } }

public static void main(String[] args) { }

@SuppressWarnings(\) AddMessage amg = new AddMessage(); num.setText(\); oldpassword.setText(\); nam.setText(\); clas.setText(\); scl.setText(\); num.requestFocus(); }

}

stmt1.close(); }

catch (SQLException se) { }

JOptionPane.showMessageDialog(s,se.getMessage());

加失败,您输入的学号不存在!\);

else

2.3.学生查询个人信息模块 //函数库

import javax.swing.*; import java.awt.event.*;

15

import java.sql.*;

public class Search extends JFrame implements ActionListener {

private static final long serialVersionUID = 1L; /*查询学生信息控件*/ static Search s;

JPanel jpl = new JPanel();

JLabel label1 = new JLabel(\学 号\JButton search = new JButton(\查 询\

JLabel label2 = new JLabel(\姓 名\JLabel label3 = new JLabel(\班 级\JLabel label4 = new JLabel(\学 院\JLabel label5 = new JLabel(\性 别\JLabel label6 = new JLabel(\密 码\ButtonGroup bgp = new ButtonGroup(); JRadioButton man = new JRadioButton(\男\JRadioButton women = new JRadioButton(\女\JTextField num = new JTextField(); JTextField password = new JTextField(); JTextField nam = new JTextField(); JTextField clas = new JTextField(); JTextField scl = new JTextField(); JButton reset = new JButton(\重 置\public Search() {

super(\查询信息\this.setSize(500,400); this.setVisible(true); //将当前窗口防止在屏幕中央 setLocationRelativeTo(null); this.setResizable(false);

this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

16

搜索更多关于: 基于Java和Oracle的学生信息管理系统 的文档
  • 收藏
  • 违规举报
  • 版权认领
下载文档10.00 元 加入VIP免费下载
推荐下载
本文作者:...

共分享92篇相关文档

文档简介:

} sex=\; JOptionPane.showMessageDialog(this,\性别不可为空,无法完成添加!\); else { if(man.isSelected()) { sex=\男\; } else { sex=\女\; } try { } catch (ClassNotFoundException ce) { } try { Connection con = JOption

× 游客快捷下载通道(下载后可以自由复制和排版)
单篇付费下载
限时特价:10 元/份 原价:20元
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219
Copyright © 云题海 All Rights Reserved. 苏ICP备16052595号-3 网站地图 客服QQ:370150219 邮箱:370150219@qq.com