数据库作业 JAVa 嵌入式SQL

  • u6_858609
    了解作者
  • 568.9KB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-04-13 20:04
    上传日期
数据库作业 JAVa 嵌入式SQL数据库作业 JAVa 嵌入式SQL
数据管理实验.rar
  • 数据管理实验
  • src
  • 数据统计
  • MingCiStu.java
    5.6KB
  • XueFenStu.java
    6.2KB
  • ChengJiStu.java
    28.9KB
  • KeChengStu.java
    6.3KB
  • 信息管理
  • CourseInfo.java
    6KB
  • StudentInfo_jtable.java
    6KB
  • TeacherInfo.java
    6KB
  • ReportInfo_jtable.java
    7.3KB
  • TeacherCourseInfo.java
    7.2KB
  • util
  • DataBaseManager.java
    1.7KB
  • 信息查询
  • ClassCoursesQuery.java
    6.3KB
  • TeacherInfoQuery.java
    6.2KB
  • StudentsReportsQuery.java
    7.4KB
  • TeacherCoursesQuery.java
    7.3KB
  • StuInfoQuery1.java
    6.2KB
  • 用户管理
  • UserManage.java
    5.9KB
  • UserLogIn.java
    2.8KB
  • mainFrame
  • stuManagerJFrame.java
    15.3KB
  • .settings
  • org.eclipse.jdt.ui.prefs
    99B
  • org.eclipse.jdt.core.prefs
    629B
  • bin
  • 数据统计
  • KeChengStu.class
    6.7KB
  • MingCiStu.class
    5.8KB
  • KeChengStu$1.class
    775B
  • XueFenStu$1.class
    768B
  • XueFenStu$2.class
    549B
  • ChengJiStu$1.class
    553B
  • XueFenStu.class
    6.6KB
  • ChengJiStu.class
    14.5KB
  • MingCiStu$1.class
    549B
  • KeChengStu$2.class
    553B
  • 信息管理
  • TeacherInfo$1.class
    535B
  • StudentInfo_jtable$1.class
    563B
  • TeacherInfo.class
    6.9KB
  • StudentInfo_jtable.class
    6.9KB
  • TeacherCourseInfo.class
    7.9KB
  • CourseInfo.class
    6.9KB
  • CourseInfo$1.class
    531B
  • TeacherCourseInfo$1.class
    559B
  • ReportInfo_jtable.class
    7.9KB
  • ReportInfo_jtable$1.class
    559B
  • util
  • DataBaseManager.class
    2.2KB
  • 信息查询
  • StuInfoQuery1.class
    6.6KB
  • StuInfoQuery1$1.class
    796B
  • TeacherInfoQuery$2.class
    577B
  • StudentsReportsQuery$1.class
    845B
  • TeacherInfoQuery.class
    6.6KB
  • TeacherInfoQuery$1.class
    817B
  • StudentsReportsQuery.class
    7.3KB
  • StudentsReportsQuery$2.class
    593B
  • StuInfoQuery1$2.class
    565B
  • ClassCoursesQuery$2.class
    581B
  • ClassCoursesQuery.class
    6.8KB
  • TeacherCoursesQuery.class
    7.3KB
  • TeacherCoursesQuery$2.class
    589B
  • TeacherCoursesQuery$1.class
    838B
  • ClassCoursesQuery$1.class
    824B
  • 用户管理
  • UserLogIn.class
    3.8KB
  • UserManage.class
    6.9KB
  • UserManage$1.class
    531B
  • mainFrame
  • stuManagerJFrame$7.class
    913B
  • stuManagerJFrame$1.class
    1002B
  • stuManagerJFrame$13.class
    909B
  • stuManagerJFrame$15.class
    1KB
  • stuManagerJFrame$8.class
    917B
  • stuManagerJFrame.class
    7.7KB
  • stuManagerJFrame$5.class
    1006B
  • stuManagerJFrame$14.class
    906B
  • stuManagerJFrame$4.class
    1005B
  • stuManagerJFrame$3.class
    994B
  • stuManagerJFrame$12.class
    906B
  • stuManagerJFrame$6.class
    910B
  • stuManagerJFrame$9.class
    917B
  • stuManagerJFrame$11.class
    907B
  • stuManagerJFrame$10.class
    914B
  • stuManagerJFrame$2.class
    995B
  • stuManagerJFrame$16.class
    570B
  • .project
    394B
  • 数据管理实验_fat.jar
    492.2KB
  • .fatjar
    377B
  • .classpath
    573B
内容介绍
package 数据统计; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.sql.Connection; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.SQLException; import java.sql.Statement; import java.util.Vector; import javax.swing.JOptionPane; import javax.swing.JScrollPane; import javax.swing.JTable; import javax.swing.event.TableModelEvent; import javax.swing.event.TableModelListener; import javax.swing.table.DefaultTableModel; import util.DataBaseManager; /** * * @author dell */ public class ChengJiStu extends javax.swing.JFrame implements TableModelListener, ActionListener { DataBaseManager db = null; Connection conn = null; Statement stmt = null; ResultSet rs = null; private JTable table; Vector rows; public DefaultTableModel dtm; int rowCount = 0; /** Creates new form StuReportsFrame */ public ChengJiStu() { super("成绩统计"); db = new DataBaseManager(); conn = db.con; stmt = db.stmt; initComponents(); // getTable(); } /** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") private void initComponents() { buttonGroup1 = new javax.swing.ButtonGroup(); jPanel1 = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); jTable1 = new javax.swing.JTable(); jLabel1 = new javax.swing.JLabel(); jPanel2 = new javax.swing.JPanel(); stuAvgRBtn = new javax.swing.JRadioButton(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); stuNoTF1 = new javax.swing.JTextField(); stuYrTF1 = new javax.swing.JTextField(); stuTotalScoreRBtn = new javax.swing.JRadioButton(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); stuNoTF2 = new javax.swing.JTextField(); stuYrTF2 = new javax.swing.JTextField(); jPanel3 = new javax.swing.JPanel(); courseAvgRBtn = new javax.swing.JRadioButton(); jLabel6 = new javax.swing.JLabel(); cNoTF1 = new javax.swing.JTextField(); courseScoreHigherRBtn = new javax.swing.JRadioButton(); jLabel7 = new javax.swing.JLabel(); jLabel8 = new javax.swing.JLabel(); cNoTF2 = new javax.swing.JTextField(); selectTF1 = new javax.swing.JTextField(); courseScoreLowerRBtn = new javax.swing.JRadioButton(); jLabel9 = new javax.swing.JLabel(); jLabel10 = new javax.swing.JLabel(); cNoTF3 = new javax.swing.JTextField(); selectTF2 = new javax.swing.JTextField(); courseScoreBetweenRBtn = new javax.swing.JRadioButton(); jLabel11 = new javax.swing.JLabel(); jLabel12 = new javax.swing.JLabel(); jLabel13 = new javax.swing.JLabel(); selectTF3 = new javax.swing.JTextField(); selectTF4 = new javax.swing.JTextField(); cNoTF4 = new javax.swing.JTextField(); statBtn = new javax.swing.JButton(); cancleBtn = new javax.swing.JButton(); jTable1.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null, null}, {null, null, null, null}, {null, null, null, null}, {null, null, null, null} }, new String [] { "", "", "", "" } )); jScrollPane1.setViewportView(jTable1); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 318, Short.MAX_VALUE) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 211, Short.MAX_VALUE) ); jLabel1.setText("统计结果"); jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("统计条件")); buttonGroup1.add(stuAvgRBtn); stuAvgRBtn.setText("学生平均成绩统计"); jLabel2.setText("学 号:"); jLabel3.setText("统计学年:"); buttonGroup1.add(stuTotalScoreRBtn); stuTotalScoreRBtn.setText("学生总分统计"); jLabel4.setText("学 号:"); jLabel5.setText("统计学年:"); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(stuAvgRBtn) .addGroup(jPanel2Layout.createSequentialGroup() .addGap(21, 21, 21) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel2) .addComponent(jLabel3))) .addComponent(stuTotalScoreRBtn) .addGroup(jPanel2Layout.createSequentialGroup() .addGap(21, 21, 21) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel5) .addComponent(jLabel4)))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(stuYrTF2, javax.swing.GroupLayout.DEFAULT_SIZE, 115, Short.MAX_VALUE) .addComponent(stuNoTF2, javax.swing.GroupLayout.DEFAULT_SIZE, 115, Short.MAX_VALUE) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(stuYrTF1) .addComponent(stuNoTF1, javax.swing.GroupLayout.DEFAULT_SIZE, 115, Short.MAX_VALUE))) .addGap(64, 64, 64)) ); jPanel2Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jLabel2, jLabel3}); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addComponent(stuAvgRBtn) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 15, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(stuNoTF1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel3) .addComponent(stuYrTF1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREF
评论
    相关推荐