开发一个简单的数据库应用程序。

要求如下:

使用附件中的SQL语句初始化数据库,完成一个控制台应用(也可用SWING应用或Web应用)程序的开发,该程序应该能够提供如下功能:

1. 用户通过菜单可以选择不同操作功能。

2. 用户可以查询所有课程信息。

3. 用户可以新增课程信息。

4. 用户可以修改现有的课程信息。

5. 用户可以删除指定课程的信息。

6. 用户可以查询指定某门课程的选课情况。

参考资料:

基于Java的GUI界面+SQL Server数据库课程信息管理系统

学生选课管理系统的设计与实现

在eclipse不小心删掉了java文件怎么找回?

Java Swing开发知识总结

GetDBConnection.java

import java.sql.*;
public class GetDBConnection {public static Connection connectDB(String DBName,String id,String p) {Connection con = null;String uri = "jdbc:mysql://localhost:3308/"+DBName+"?useSSL=true&characterEncoding=utf-8";try{  Class.forName("com.mysql.jdbc.Driver");//加载JDBC-MySQL驱动}catch(Exception e){}try{  con = DriverManager.getConnection(uri,id,p); //连接代码}catch(SQLException e){}return con;}
}

LoginWindow.java


import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
public  class LoginWindow extends JFrame{//标签private JLabel lable1;private JLabel lable2;//文本框private JTextField text1;private JTextField text2;//按钮private JButton bt1;private JButton bt2;  //构造函数public LoginWindow(){this.init();this.addComponent();this.addListener();}public void init(){this.setSize(500,400);this.setVisible(true);this.setTitle("登录界面");this.setLayout(null);this.setLocation(700, 300);this.getContentPane().setBackground(Color.orange);}private void addComponent(){lable1 = new JLabel("用户名");lable1.setSize(100,70);lable1.setLocation(100,80);this.add(lable1);lable2 = new JLabel("密    码");lable2.setSize(100,70);lable2.setLocation(100,130);this.add(lable2);text1 = new JTextField();text1.setSize(150,30);text1.setLocation(160,100);this.add(text1);text2 = new JTextField();text2.setSize(150,30);text2.setLocation(160,150);this.add(text2);bt1 = new JButton("登录");bt1.setSize(70,30); bt1.setLocation(140,195);this.add(bt1);bt2 = new JButton("退出");bt2.setSize(70,30);bt2.setLocation(250,195);this.add(bt2);this.setBackground(Color.GRAY);//设置单击关闭按钮时的默认操作this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);}private void addListener(){bt1.addActionListener(new ActionListener(){public void actionPerformed(ActionEvent e){if(text1.getText().equals("abc")&&text2.getText().equals("123")){new Menu();dispose();}else{JOptionPane.showMessageDialog(null, "登陆密码错误");}}});bt2.addActionListener(new ActionListener(){public void actionPerformed(ActionEvent e){dispose();}});}public static void main(String[] args) {new LoginWindow();}}

Menu.java

import java.awt.Color;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;
public   class Menu extends JFrame implements ActionListener {JButton bt1;JButton bt2;JButton bt3;JButton bt4;JButton bt5;JPanel panel;JPanel panel2;JLabel label1;JLabel label2;Menu(){this.setSize(900, 700);// 设置尺寸this.setTitle("学生课程管理系统");this.setLayout(null);this.setLocation(400,200);// 设置坐标this.getContentPane().setBackground(Color.orange);this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);bt1=new JButton("查询课程");bt1.setSize(150, 50);bt1.setLocation(150, 400);bt1.addActionListener(new queryActionPerformed());bt1.setActionCommand("查询课程");bt2=new JButton("删除课程");bt2.setSize(150, 50);bt2.setLocation(150, 500);bt2.addActionListener(this);bt2.setActionCommand("删除课程");bt3=new JButton("添加课程");bt3.setSize(150, 50);bt3.setLocation(550, 400);bt3.addActionListener(this);bt3.setActionCommand("添加课程");bt4=new JButton("修改课程");bt4.setSize(150, 50);bt4.setLocation(550, 500);bt4.addActionListener(this);bt4.setActionCommand("修改课程");    bt5=new JButton("查找新增课程");bt5.setSize(150, 50);bt5.setLocation(350, 450);bt5.addActionListener(this);bt5.setActionCommand("查找新增课程");   this.add(bt1);this.add(bt2);this.add(bt3);this.add(bt4);this.add(bt5);panel=new JPanel(); // 创建内容面板panel.setLocation(100, 20);panel.setLayout(null);this.add(panel);panel2=new JPanel();panel2.setSize(650,350);panel2.setLocation(100, 20);panel2.setLayout(null);panel2.setBackground(Color.white);label1=new JLabel(); // 创建一个标签label2=new JLabel();label1.setText("WELCOME");label2.setText("欢迎登陆课程管理系统");label1.setLocation(270,20);label1.setSize(500, 200);label2.setLocation(165,60);label2.setSize(500, 200);panel2.add(label1);panel2.add(label2);label1.setFont( (new Font("仿宋",Font.BOLD,30)));label2.setFont( (new Font("仿宋",Font.BOLD,30)));this.add(panel2);   panel2.setVisible(true);this.setVisible(true);}public class queryActionPerformed implements ActionListener{public void actionPerformed(ActionEvent e){new FindCourse().setVisible(true);}}@Overridepublic void actionPerformed(ActionEvent e) {JButton bt=(JButton )e.getSource();//移除上一个面板if(bt!=null){this.remove(panel2);this.remove(panel);}if(bt.getText().equals("查询课程")){/*panel=new FindCourse();panel.setLocation(100, 20);this.add(panel);this.repaint();*/bt1=new JButton("查询课程");bt1.addActionListener(new queryActionPerformed());}     else{if(bt.getText().equals("添加课程")){panel=new AddCourse();panel.setLocation(100, 20);this.add(panel);this.repaint();} else{if(bt.getText().equals("删除课程")){panel=new DeleteCourse();panel.setLocation(100, 20);this.add(panel);this.repaint();}else{ if(bt.getText().equals("修改课程")){panel=new UpdateCourse();panel.setLocation(100, 20);this.add(panel);this.repaint();}else{ if(bt.getText().equals("查找新增课程")){panel=new FindNewCourse();panel.setLocation(100, 20);this.add(panel);this.repaint();}}}   }}
}
}

AddCourse.java

import java.awt.Color;
import java.awt.Font;
import java.sql.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;
public  class AddCourse extends JPanel implements ActionListener{JLabel cname;JLabel cno;JLabel cpno;JLabel credit;JTextField cnametext;JTextField cnotext;JTextField cpnotext;JTextField credittext;JButton Addbt;public AddCourse() {this.setSize(650,350);this.setLocation(100, 20);this.setLayout(null);this.setBackground(Color.WHITE);               cname=new JLabel("需添加的课程名称");cname.setSize(200,30);cname.setLocation(60, 20);     this.add(cname);cnametext=new JTextField();cnametext.setSize(120,30);cnametext.setLocation(180, 20);this.add(cnametext);cno=new JLabel("需添加的课程号");cno.setSize(200,30);cno.setLocation(60, 60);this.add(cno);cnotext=new JTextField();cnotext.setSize(120,30);cnotext.setLocation(180, 60);this.add(cnotext);cpno=new JLabel("需添加的先修课程号");cpno.setSize(200,30);cpno.setLocation(60, 100);            this.add(cpno);cpnotext=new JTextField();cpnotext.setSize(120,30);cpnotext.setLocation(180, 100);this.add(cpnotext);       credit=new JLabel("需添加的课程学分");credit.setSize(200,30);credit.setLocation(60, 140);this.add(credit);credittext=new JTextField();credittext.setSize(120,30);credittext.setLocation(180, 140);this.add(credittext);this.setVisible(true);Addbt=new JButton("添加");Addbt.setSize(80,30);Addbt.setLocation(180, 200);this.add(Addbt);  Addbt.addActionListener(this);           } @Overridepublic void actionPerformed(ActionEvent e) {String addcname=cnametext.getText();String addcno=cnotext.getText();String addcpno=cpnotext.getText();String addcredit=credittext.getText();Connection con;Statement sql; con = GetDBConnection.connectDB("EDUC","root","");if(con == null ) return; try {sql=con.createStatement();//创建SQL语句执行对象     String  strSQL="insert into course values('"+addcno+"','"+addcname+"','"+addcpno+"','"+addcredit+"')";String  strSQL1="(Select* from  course where cname='"+addcname+"' )";if(!addcname.trim().equals("")&&!addcno.trim().equals("")&&!addcpno.trim().equals("")&&!addcredit.trim().equals("")){ResultSet rs1=sql.executeQuery(strSQL1);if(rs1.next())     {JOptionPane.showMessageDialog(null,"该课程已存在");     }else {int rs=sql.executeUpdate(strSQL);if(rs==1) {JOptionPane.showMessageDialog(null,"课程添加成功");}else{JOptionPane.showMessageDialog(null,"课程添加失败");}}}else{ JOptionPane.showMessageDialog(null,"课程信息输入有误,请重新输入!");}          con.close();     //关闭数据库连接    }   catch (SQLException ex) {System.out.println("数据库连接或者是数据库操作失败");}}
}

FindNewCourse.java

import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
public  class FindNewCourse extends JPanel implements ActionListener{JLabel cname;JLabel cno;JLabel cpno;JLabel credit;JTextField cnametext;JTextField cnotext;JTextField cpnotext;JTextField credittext;JButton Findbt;JLabel Inputlabel;JTextField Inputtext;public FindNewCourse() {this.setSize(650,350);this.setLocation(100, 20);this.setLayout(null);this.setBackground(Color.WHITE);    Inputlabel=new JLabel("请输入需要查找的课程名称");Inputlabel.setSize(300,50);Inputlabel.setLocation(320, 45);this.add(Inputlabel);Inputtext=new JTextField();Inputtext.setSize(160,40);Inputtext.setLocation(480, 45);this.add(Inputtext);cname=new JLabel("课程名称");cname.setSize(200,30);cname.setLocation(60, 60);      this.add(cname);cnametext=new JTextField();cnametext.setSize(120,30);cnametext.setLocation(180, 60);this.add(cnametext);cno=new JLabel("课程号");cno.setSize(200,30);cno.setLocation(60, 20);this.add(cno);cnotext=new JTextField();cnotext.setSize(120,30);cnotext.setLocation(180, 20);this.add(cnotext);cpno=new JLabel("先修课程号");cpno.setSize(200,30);cpno.setLocation(60, 100);            this.add(cpno);cpnotext=new JTextField();cpnotext.setSize(120,30);cpnotext.setLocation(180, 100);this.add(cpnotext);       credit=new JLabel("课程学分");credit.setSize(200,30);credit.setLocation(60, 140);this.add(credit);credittext=new JTextField();credittext.setSize(120,30);credittext.setLocation(180, 140);this.add(credittext);this.setVisible(true);Findbt=new JButton("查找");Findbt.setSize(80,30);Findbt.setLocation(400, 100);this.add(Findbt);  Findbt.addActionListener(this);  }@Overridepublic void actionPerformed(ActionEvent e) {String inputName=Inputtext.getText();Connection con;Statement sql; con = GetDBConnection.connectDB("EDUC","root","");if(con == null ) return; try {sql=con.createStatement();//创建SQL语句执行对象     String  strSQL="(Select* from  course where cname='"+inputName+"' )";ResultSet rs=sql.executeQuery(strSQL);if(rs.next()){cnotext.setText(rs.getString(1)); cnametext.setText(rs.getString(2));cpnotext.setText(rs.getString(3));credittext.setText(rs.getString(4));}else{ JOptionPane.showMessageDialog(null, "您查询的课程不存在,请重新输入");}con.close();//关闭数据库连接   } catch (SQLException ex) {System.out.println("数据库连接或者是数据库操作失败");}}}

UpdateCourse.java


import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;public  class UpdateCourse extends JPanel implements ActionListener {JLabel Inputlabel;JTextField Inputtext;JLabel cname;JLabel cno;JLabel cpno;JLabel credit;JTextField cnametext;JTextField cnotext;JTextField cpnotext;JTextField credittext;JButton Updatebt;public UpdateCourse() {this.setSize(650,350);this.setLocation(100, 20);this.setLayout(null);this.setBackground(Color.white);cname=new JLabel("需修改的课程名称");cname.setSize(200,30);cname.setLocation(60, 20);     this.add(cname);cnametext=new JTextField();cnametext.setSize(120,30);cnametext.setLocation(180, 20);this.add(cnametext);cno=new JLabel("需修改的课程号");cno.setSize(200,30);cno.setLocation(60, 60);this.add(cno);cnotext=new JTextField();cnotext.setSize(120,30);cnotext.setLocation(180, 60);this.add(cnotext);cpno=new JLabel("需修改的先修课程号");cpno.setSize(200,30);cpno.setLocation(60, 100);            this.add(cpno);cpnotext=new JTextField();cpnotext.setSize(120,30);cpnotext.setLocation(180, 100);this.add(cpnotext);       credit=new JLabel("需修改的课程学分");credit.setSize(200,30);credit.setLocation(60, 140);this.add(credit);credittext=new JTextField();credittext.setSize(120,30);credittext.setLocation(180, 140);this.add(credittext);this.setVisible(true);Updatebt=new JButton("修改");Updatebt.setSize(80,30);Updatebt.setLocation(180, 200);this.add(Updatebt);  Updatebt.addActionListener(this);            } @Overridepublic void actionPerformed(ActionEvent e) {String updatecname=cnametext.getText();String updatecpno=cpnotext.getText();String updatecno=cnotext.getText();String updatecredit=credittext.getText();Connection con;Statement sql;           con = GetDBConnection.connectDB("EDUC","root","");if(con == null ) return; try {sql=con.createStatement();         //创建SQL语句执行对象String  strSQL1="update course set cpno='"+updatecpno+"' where cname='"+updatecname+"'";String  strSQL2="update course set cno='"+updatecno+"' where cname='"+updatecname+"'";String  strSQL3="update course set credit='"+updatecredit+"' where cname='"+updatecname+"'";int rs1=sql.executeUpdate(strSQL1);int rs2=sql.executeUpdate(strSQL2);int rs3=sql.executeUpdate(strSQL3);if(rs1==1&&rs2==1&&rs3==1) {JOptionPane.showMessageDialog(null,"课程修改成功");}else{JOptionPane.showMessageDialog(null,"课程修改失败");}con.close();   //关闭数据库连接  } catch (SQLException ex) {System.out.println("数据库连接或者是数据库操作失败");}}}

通过查找新增课程按钮,检查修改课程的信息是否有误:

DeleteCourse.java


import java.awt.Color;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import javax.swing.*;
public  class DeleteCourse extends JPanel implements ActionListener{JLabel cname;JTextField cnametext;JButton Delbt;JTable table;   public DeleteCourse() {     this.setSize(650,350);this.setLocation(100, 20);this.setLayout(null);this.setBackground(Color.WHITE);cname=new JLabel("请输入需要删除的课程名称");cname.setSize(200,50);cname.setLocation(50, 50);this.add(cname);cnametext=new JTextField();cnametext.setSize(160,40);cnametext.setLocation(220, 50);this.add(cnametext);Delbt=new JButton("确认删除");Delbt.setSize(90,38);Delbt.setLocation(200, 150);this.add(Delbt); Delbt.addActionListener(this);/*Object[] columnTitle= {"课程号","课程名称","先修课程号","课程学分"};//表格行对象数据Object[][] tableData= {new Object[] {"1","数据库","5","4分"},new Object[] {"2","数学","null","2分"},new Object[] {"3","信息系统","1","4分"},  new Object[] {"4","操作系统","6","3分"},new Object[] {"5","数据结构","7","2分"},new Object[] {"6","数据处理","null","4分"},  new Object[] {"7","PASCAL语言","6","4分"},new Object[] {"8","大学英语","null","4分"},new Object[] {"9","计算机网络","null","4分"},  new Object[] {"10","人工智能","null","2分"}, };//创建表格JTable  table=new JTable(tableData,columnTitle);JScrollPane scrollpane=new JScrollPane(table);scrollpane.setSize(550,250);scrollpane.setLocation(60, 20);this.add(scrollpane);this.setVisible(true);*/}@Overridepublic void actionPerformed(ActionEvent e) {String delName=cnametext.getText();Connection con;Statement sql; con = GetDBConnection.connectDB("EDUC","root","");if(con == null ) return; try {                    sql=con.createStatement();//创建SQL语句执行对象String strSQL="delete from  course where cname='"+delName+"' ";                 int rs=sql.executeUpdate(strSQL);if(rs==1) {JOptionPane.showMessageDialog(null,"课程删除成功");}else{JOptionPane.showMessageDialog(null,"课程删除失败");}con.close();                 //关闭数据库连接    } catch (SQLException ex) {System.out.println("数据库连接或者是数据库操作失败");
}
}
}

通过点击查找新增课程按钮,检查课程是否删除成功:

FindCourse.java

import java.awt.*;
import javax.swing.event.*;
import java.awt.event.*;
import javax.swing.*;
import java.sql.*;
public class FindCourse extends JFrame{JTextArea show;JButton button1,button2;JComboBox comoBox;static Statement sql;static{try{Class.forName("com.mysql.jdbc.Driver");Connection con=GetDBConnection.connectDB("EDUC","root","");sql=con.createStatement();}catch(Exception e){}}@SuppressWarnings("unchecked")public FindCourse(){show=new JTextArea(5,10);button1=new JButton("查询所有课程信息");button1.addActionListener(new FindAllCourse());Container container=getContentPane();container.setLayout(new BorderLayout());JPanel panel=new JPanel();JPanel mainpanel=new JPanel();String items[]={"请选择","数据库","数学","信息系统","操作系统","数据结构","数据处理","PASCAL语言","大学英语","计算机网络","人工智能"};comoBox=new JComboBox(items);button2=new JButton("按课程名称查询");button2.addActionListener(new FindCourseByCname());panel.add(button2);panel.add(comoBox);panel.setVisible(true);mainpanel.add(panel);mainpanel.setBackground(Color.orange);panel=new JPanel();panel.add(button1);panel.setBackground(Color.orange);container.add(mainpanel,BorderLayout.NORTH);container.add(panel,BorderLayout.SOUTH);container.add(new JScrollPane(show),BorderLayout.CENTER);setTitle("查询课程");setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);setSize(750,400);Toolkit kit = Toolkit.getDefaultToolkit();Dimension screenSize = kit.getScreenSize();//获取屏幕尺寸对象int screenWidth = screenSize.width/2;//水平位置int screenHeight = screenSize.height/2;//垂直位置int height = this.getHeight();int width = this.getWidth();setLocation(screenWidth-width/2, screenHeight-height/2);//屏幕宽度(高度)减去窗口宽度(高度),然后在除以2,就是居中了setVisible(true);}class FindAllCourse implements ActionListener{public void actionPerformed(ActionEvent e){try{String sqlStr="select student.sno,student.sname,course.cno,course.cname,course.cpno,course.credit,sc.grade from student,course,sc"+ " where student.sno = sc.sno AND sc.cno = course.cno  ";ResultSet rs=sql.executeQuery(sqlStr);show.setText("");show.append("学号\t姓名\t课程号\t课程名\t先修课程号\t课程学分\t成绩"+"\n");while(rs.next()){show.append(rs.getString(1)+" "+"\t");show.append(rs.getString(2)+" "+"\t");show.append(rs.getString(3)+" "+"\t");show.append(rs.getString(4)+" "+"\t");show.append(rs.getString(5)+" "+"\t");show.append(rs.getString(6)+" "+"\t");show.append(rs.getString(7)+"\n");}}catch(Exception ee){}}}class FindCourseByCname implements ActionListener{public void actionPerformed(ActionEvent e){try{String sqlStr="";String course=comoBox.getSelectedItem().toString();if(course.equals("数据库")){sqlStr="select student.sno,student.sname,course.cno,course.cname,course.cpno,course.credit,sc.grade from student,course,sc"+ " where student.sno = sc.sno AND sc.cno = course.cno AND cname='数据库'";show.setText("");show.append("学号\t姓名\t课程号\t课程名\t先修课程号\t课程学分\t成绩"+"\n");}else if(course.equals("数学")){sqlStr="select student.sno,student.sname,course.cno,course.cname,course.cpno,course.credit,sc.grade from student,course,sc "+ "where student.sno = sc.sno AND sc.cno = course.cno AND cname = '数学'";show.setText("");show.append("学号\t姓名\t课程号\t课程名\t先修课程号\t课程学分\t成绩"+"\n");}else if(course.equals("信息系统")){sqlStr="select student.sno,student.sname,course.cno,course.cname,course.cpno,course.credit,sc.grade from student,course,sc "+ "where student.sno = sc.sno AND sc.cno = course.cno AND cname = 信息系统' ";show.setText("");show.append("学号\t姓名\t课程号\t课程名\t先修课程号\t课程学分\t成绩"+"\n");}else if(course.equals("操作系统")){sqlStr="select student.sno,student.sname,course.cno,course.cname,course.cpno,course.credit,sc.grade from student,course,sc "+ "where student.sno = sc.sno AND sc.cno = course.cno AND cname = '操作系统' ";show.setText("");show.append("学号\t姓名\t课程号\t课程名\t先修课程号\t课程学分\t成绩"+"\n");}else if(course.equals("数据结构")){sqlStr="select student.sno,student.sname,course.cno,course.cname,course.cpno,course.credit,sc.grade from student,course,sc "+ "where student.sno = sc.sno AND sc.cno = course.cno AND cname = '数据结构' ";show.setText("");show.append("学号\t姓名\t课程号\t课程名\t先修课程号\t课程学分\t成绩"+"\n");}else if(course.equals("数据处理")){sqlStr="select student.sno,student.sname,course.cno,course.cname,course.cpno,course.credit,sc.grade from student,course,sc "+ "where student.sno = sc.sno AND sc.cno = course.cno AND cname = '数据处理' ";show.setText("");show.append("学号\t姓名\t课程号\t课程名\t先修课程号\t课程学分\t成绩"+"\n");}else if(course.equals("PASCAL语言")){sqlStr="select student.sno,student.sname,course.cno,course.cname,course.cpno,course.credit,sc.grade from student,course,sc "+ "where student.sno = sc.sno AND sc.cno = course.cno AND cname = 'PASCAL语言' ";show.setText("");show.append("学号\t姓名\t课程号\t课程名\t先修课程号\t课程学分\t成绩"+"\n");}else if(course.equals("大学英语")){sqlStr="select student.sno,student.sname,course.cno,course.cname,course.cpno,course.credit,sc.grade from student,course,sc "+ "where student.sno = sc.sno AND sc.cno = course.cno AND cname = '大学英语' ";show.setText("");show.append("学号\t姓名\t课程号\t课程名\t先修课程号\t课程学分\t成绩"+"\n");}else if(course.equals("计算机网络")){sqlStr="select student.sno,student.sname,course.cno,course.cname,course.cpno,course.credit,sc.grade from student,course,sc "+ "where student.sno = sc.sno AND sc.cno = course.cno AND cname = '计算机网络' ";show.setText("");show.append("学号\t姓名\t课程号\t课程名\t先修课程号\t课程学分\t成绩"+"\n");}else if(course.equals("人工智能")){sqlStr="select student.sno,student.sname,course.cno,course.cname,course.cpno,course.credit,sc.grade from student,course,sc "+ "where student.sno = sc.sno AND sc.cno = course.cno AND cname = '人工智能' ";show.setText("");show.append("学号\t姓名\t课程号\t课程名\t先修课程号\t课程学分\t成绩"+"\n");}ResultSet rs=sql.executeQuery(sqlStr);while(rs.next()){show.append(rs.getString(1)+" "+"\t");show.append(rs.getString(2)+" "+"\t");show.append(rs.getString(3)+" "+"\t");show.append(rs.getString(4)+" "+"\t");show.append(rs.getString(5)+" "+"\t");show.append(rs.getString(6)+" "+"\t");show.append(rs.getString(7)+"\n ");}}catch(Exception ee){}}}
}

按课程名称查询:

查询所有课程信息:

java+mysql+学生课程管理系统的实现相关推荐

  1. 基于Java的学生课程管理系统的设计和实现

    基于Java的学生课程管理系统的设计和实现 软件工程王曦楠 要] 学生课程管理系统一直是学校高效组织管理办法信领域内的一个重要课题,特别随着当前教育领域内的深度变革,怎样才能让学生课程管理系统在教育机 ...

  2. java mysql 学生成绩管理系统_Java实现简单的学生成绩管理系统

    ScoreInformation.java import java.util.Scanner; class ScoreInformation { private String stunumber;   ...

  3. Java Swing Mysql学生信息管理系统

    通过对Swing的理解 此篇为大家推荐基于JAVA Swing Mysql学生信息管理系统 本视频教程一共分为四个阶段,每个阶段都会是上一个阶段的扩展,每一个阶段的系统都可独立作为一个完整的系统 第一 ...

  4. java课程管理系统_基于JAVA学生课程管理系统.doc

    您所在位置:网站首页 > 海量文档 &nbsp>&nbsp计算机&nbsp>&nbspJava 基于JAVA学生课程管理系统.doc62页 本文档一共 ...

  5. Java+Swing+mysql学生信息管理系统

    Java+Swing+mysql学生信息管理系统 一.系统介绍 二.功能展示 1.管理员登陆 2.学生信息查询 3.学生信息添加 4.学生信息修改 5.删除 三.系统实现 1.StudentFrame ...

  6. jsp+ssh+mysql实现的Java web学生考勤管理系统源码附带视频指导运行教程

    今天给大家演示的是一款由jsp+ssh+mysql实现的Java web学生考勤管理系统,其中struts版本是struts2.本系统实现了管理员.学生.教师三个角色的功能,其中管理员可以管理基本信息 ...

  7. java+mysql学生学籍后台管理系统源码

    介绍: java+mysql学生学籍后台管理系统源码 网盘下载地址: http://kekewl.cc/ikZ3un3U9en0 图片:

  8. Java+Swing+Mysql学生宿舍管理系统

    Java+Swing+Mysql学生宿舍管理系统 一.系统介绍 二.系统展示 1.用户登陆 2.寝室查询--学生 3.学生信息查询--学生 4.宿舍管理--管理员 5.学生信息管理--管理员 6.住宿 ...

  9. 基于Java毕业设计学生公寓管理系统源码+系统+mysql+lw文档+部署软件

    基于Java毕业设计学生公寓管理系统源码+系统+mysql+lw文档+部署软件 基于Java毕业设计学生公寓管理系统源码+系统+mysql+lw文档+部署软件 项目架构:B/S架构 开发语言:Java ...

  10. ssm毕设项目基于Java通识课程管理系统v87xr(java+VUE+Mybatis+Maven+Mysql+sprnig)

    ssm毕设项目基于Java通识课程管理系统v87xr(java+VUE+Mybatis+Maven+Mysql+sprnig) 项目运行 环境配置: Jdk1.8 + Tomcat8.5 + Mysq ...

最新文章

  1. 【图论专题】无向图的双连通分量
  2. 路由协议:RIP/OSPF/BGP—Vecloud微云
  3. 用RadASM 开发窗口程序
  4. Python Pycharm在运行过程中,查看每个变量(show variables)
  5. 设计企业网站大纲_哈尔滨企业网站设计费用,网站开发公司_华阳网络
  6. 物联网协议之CoAP协议开发学习笔记之术语解释
  7. c语言if语句条件是字母,C语言的if语句中,用作判断的条件表达式为()
  8. exists用法_SQL中的ALL、ANY和SOME的用法介绍
  9. 计算机网络基础:Internet常用服务介绍​
  10. 运维之我的docker-Dockerfile构建镜像详情
  11. 为什么c语言运行了是cmd,为什么C语言的程式码执行都在命令提示符进行?而且学习的基本都是数学问题,跟开发软体有什么关系?...
  12. 画吧为什么总是显示未连接服务器,画吧APP怎么用 使用方法汇总
  13. [朴素妍][뭐라고 끝낼까][说什么结束]
  14. Twitter数据抓取
  15. 华为S9303三层交换机一次配置经历和心得
  16. Xcode快捷键—图文详解
  17. python 玩彩票程序 随机产生两位数与用户输入的相比较
  18. 用CSS实现立方体360度旋转
  19. 【linux内核分析与应用-陈莉君】设备驱动概述
  20. 链家房源数据清洗和预处理(pandas)

热门文章

  1. 多频电磁感应仪GEM-2介绍
  2. rufus 制作 Android U盘启动盘的方法
  3. Python数据分析师特训营84节
  4. NAS远程共享存储NFS
  5. 铁路售票系统_高铁铁路运营客票乘务,自动售检票务实训的诞生背景
  6. 【渝粤题库】广东开放大学 组织行为学 形成性考核
  7. 对应分析与典型相关分析CCA笔记_数学建模系列
  8. python破解wifi字典_利用Python自动生成暴力破解的字典
  9. 【VSLAM学习记录2】初识cmake
  10. MYSQL数据库管理与应用