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

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

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

  • 62 次阅读
  • 3 次下载
  • 2025/5/2 20:16:24

jmb.add(logpassword); jpl.setBackground(Color.white); Message.add(Item1); Message.add(Item2); logpassword.add(Item3); Score.add(Item4);

Item1.addActionListener(this); Item2.addActionListener(this); Item3.addActionListener(this); Item4.addActionListener(this);

}

@SuppressWarnings(\

public void actionPerformed(ActionEvent e) { }

public static void main(String[] args) {

if(e.getSource()==Item1) { }

else if(e.getSource()==Item2) { }

else if(e.getSource()==Item3) { } else { }

Score sc = new Score();

stulogpassword change = new stulogpassword(); Search ser = new Search();

AddMessage ad = new AddMessage();

@SuppressWarnings(\

9

} }

Students stu = new Students();

2.2.学生添加个人信息模块 //函数库

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

public class AddMessage extends JFrame implements ActionListener {

private static final long serialVersionUID = 1L; static AddMessage s; /*添加学生信息控件*/ JPanel jpl = new JPanel();

JLabel label1 = new JLabel(\密 码\,JLabel.CENTER); JLabel label2 = new JLabel(\学 号\,JLabel.CENTER); JLabel label3 = new JLabel(\姓 名\,JLabel.CENTER); JLabel label4 = new JLabel(\性 别\,JLabel.CENTER); JLabel label6 = new JLabel(\班 级\,JLabel.CENTER); JLabel label7 = new JLabel(\学 院\,JLabel.CENTER); JTextField oldpassword = new JTextField(8); JTextField num = new JTextField(2); JTextField nam = new JTextField(4); ButtonGroup bgp = new ButtonGroup(); JRadioButton man = new JRadioButton(\男\); JRadioButton women = new JRadioButton(\女\); JTextField clas = new JTextField(); JTextField scl = new JTextField(); JButton reset = new JButton(\清 空\); JButton addmsg = new JButton(\添 加\); public AddMessage() {

10

super(\添加基本信息\); this.setSize(500,400); this.setVisible(true); //将当前窗口防止在屏幕中央 this.setResizable(false);

this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); this.add(jpl); jpl.setLayout(null);

addmsg.addActionListener(this); reset.addActionListener(this); /*插入面板*/

label1.setBounds(130,60,80,20); jpl.add(label1);

oldpassword.setBounds(190,60,140,20); jpl.add(oldpassword);

label2.setBounds(135,20,70,20); jpl.add(label2);

num.setBounds(190,20,140,20); jpl.add(num);

label3.setBounds(135,100,70,20); jpl.add(label3);

nam.setBounds(190,100,140,20); jpl.add(nam);

label4.setBounds(135,140,70,20); jpl.add(label4);

man.setBounds(210,140,60,20); women.setBounds(280,140,60,20); jpl.add(man); jpl.add(women); bgp.add(man); bgp.add(women);

11

setLocationRelativeTo(null);

}

label6.setBounds(135,180,70,20); jpl.add(label6);

clas.setBounds(190,180,140,20); jpl.add(clas);

label7.setBounds(135,220,70,20); jpl.add(label7);

scl.setBounds(190,220,140,20); jpl.add(scl);

reset.setBounds(190,260,65,20); addmsg.setBounds(265,260,65,20); jpl.add(reset); jpl.add(addmsg);

@SuppressWarnings(\)

public void actionPerformed(ActionEvent e) {

if(e.getSource()==addmsg) {

String sex=null; String id,b,c,d, f; id= num.getText(); b= nam.getText(); c= oldpassword.getText(); d= clas.getText(); f= scl.getText();

if(id.equals(\)||b.equals(\)||c.equals(\)||d.equals(\)) { }

else if((!man.isSelected())&&(!women.isSelected())) {

12

JOptionPane.showMessageDialog(this,\你输入的信息不全,无

法完成添加!\);

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

共分享92篇相关文档

文档简介:

jmb.add(logpassword); jpl.setBackground(Color.white); Message.add(Item1); Message.add(Item2); logpassword.add(Item3); Score.add(Item4); Item1.addActionListener(this); Item2.addActionListener(this); Item3.addActionListener(this); Item4.addActionListener(this); } @SuppressWarnings(\ public void actionPerformed(ActionEvent e) {

× 游客快捷下载通道(下载后可以自由复制和排版)
单篇付费下载
限时特价: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