⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 classupdate.java~8~

📁 java语言做的教务管理系统
💻 JAVA~8~
📖 第 1 页 / 共 2 页
字号:
package java_教务管理系统;

import java.awt.*;

import javax.swing.*;
import java.awt.Rectangle;
import javax.swing.table.JTableHeader;
import javax.swing.table.DefaultTableModel;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.sql.PreparedStatement;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Connection;
import java.awt.event.MouseEvent;
import java.awt.event.MouseAdapter;
import java.awt.Font;

/**
 * <p>Title: </p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2008</p>
 *
 * <p>Company: </p>
 *
 * @author not attributable
 * @version 1.0
 */
public class classupdate extends JPanel {
    public classupdate() {
        try {
            jbInit();
        } catch (Exception exception) {
            exception.printStackTrace();
        }
    }

    private void jbInit() throws Exception {
        this.setLayout(null);
        jLabel1.setFont(new java.awt.Font("宋体", Font.PLAIN, 20));
        jLabel1.setText("月");
        jLabel1.setBounds(new Rectangle(479, 360, 24, 30));
        jLabel2.setFont(new java.awt.Font("宋体", Font.PLAIN, 20));
        jLabel2.setText("月");
        jLabel2.setBounds(new Rectangle(480, 393, 20, 28));
        jLabel3.setFont(new java.awt.Font("宋体", Font.PLAIN, 20));
        jLabel3.setText("年");
        jLabel3.setBounds(new Rectangle(366, 397, 20, 27));
        cboclassSemester.setFont(new java.awt.Font("宋体", Font.PLAIN, 20));
        cboclassSemester.setBounds(new Rectangle(549, 316, 95, 30));
        jLabel4.setFont(new java.awt.Font("宋体", Font.PLAIN, 20));
        jLabel4.setText("班级类型:");
        jLabel4.setBounds(new Rectangle(81, 313, 107, 36));
        jLabel5.setFont(new java.awt.Font("宋体", Font.PLAIN, 20));
        jLabel5.setText("日");
        jLabel5.setBounds(new Rectangle(593, 393, 29, 28));
        jLabel6.setFont(new java.awt.Font("宋体", Font.PLAIN, 20));
        jLabel6.setText("开学时间:");
        jLabel6.setBounds(new Rectangle(157, 357, 117, 41));
        cboclasscategory.setFont(new java.awt.Font("宋体", Font.PLAIN, 20));
        cboclasscategory.setBounds(new Rectangle(192, 316, 98, 30));
        tbclass.setFont(new java.awt.Font("宋体", Font.PLAIN, 15));
        tbclass.setBounds(new Rectangle(2, 106, 852, 166));
        tbclass.addMouseListener(new classupdate_tbclass_mouseAdapter(this));
        jLabel7.setFont(new java.awt.Font("宋体", Font.PLAIN, 20));
        jLabel7.setText("日");
        jLabel7.setBounds(new Rectangle(591, 361, 24, 30));
        jLabel8.setFont(new java.awt.Font("宋体", Font.PLAIN, 20));
        jLabel8.setText("班主任姓名:");
        jLabel8.setBounds(new Rectangle(420, 281, 139, 29));
        txaclassRemarks.setFont(new java.awt.Font("Dialog", Font.PLAIN, 20));
        txaclassRemarks.setBounds(new Rectangle(268, 433, 501, 68));
        cboendtimeyear.setFont(new java.awt.Font("宋体", Font.PLAIN, 20));
        cboendtimeyear.setBounds(new Rectangle(268, 396, 87, 30));
        cbobeginstimedate.setFont(new java.awt.Font("宋体", Font.PLAIN, 20));
        cbobeginstimedate.setBounds(new Rectangle(511, 359, 65, 31));
        cbobeginstimeyear.setFont(new java.awt.Font("宋体", Font.PLAIN, 20));
        cbobeginstimeyear.setBounds(new Rectangle(267, 360, 88, 30));
        cbobeginstimemonth.setFont(new java.awt.Font("宋体", Font.PLAIN, 20));
        cbobeginstimemonth.setBounds(new Rectangle(394, 360, 76, 30));
        txtclassno.setFont(new java.awt.Font("宋体", Font.PLAIN, 20));
        txtclassno.setBounds(new Rectangle(192, 279, 166, 30));
        jLabel9.setFont(new java.awt.Font("宋体", Font.PLAIN, 20));
        jLabel9.setText("毕业时间:");
        jLabel9.setBounds(new Rectangle(160, 394, 101, 40));
        jLabel10.setFont(new java.awt.Font("宋体", Font.PLAIN, 20));
        jLabel10.setText("学期:");
        jLabel10.setBounds(new Rectangle(481, 312, 92, 35));
        cboendtimemonth.setFont(new java.awt.Font("宋体", Font.PLAIN, 20));
        cboendtimemonth.setBounds(new Rectangle(395, 396, 75, 30));
        jLabel11.setFont(new java.awt.Font("宋体", Font.PLAIN, 20));
        jLabel11.setText("备注:");
        jLabel11.setBounds(new Rectangle(199, 434, 70, 37));
        cboendtimedate.setFont(new java.awt.Font("宋体", Font.PLAIN, 20));
        cboendtimedate.setBounds(new Rectangle(512, 396, 64, 28));
        txtclassmastername.setFont(new java.awt.Font("宋体", Font.PLAIN, 20));
        txtclassmastername.setBounds(new Rectangle(549, 279, 220, 30));
        jLabel12.setFont(new java.awt.Font("宋体", Font.PLAIN, 20));
        jLabel12.setText("年");
        jLabel12.setBounds(new Rectangle(366, 363, 21, 31));
        jLabel13.setFont(new java.awt.Font("宋体", Font.PLAIN, 20));
        jLabel13.setText("班级编号:");
        jLabel13.setBounds(new Rectangle(80, 277, 104, 36));
        jTableHeader1.setFont(new java.awt.Font("宋体", Font.PLAIN, 15));
        jTableHeader1.setBounds(new Rectangle(2, 84, 854, 22));
        btnclassselect.setBounds(new Rectangle(203, 516, 149, 40));
        btnclassselect.setFont(new java.awt.Font("宋体", Font.PLAIN, 20));
        btnclassselect.setText("搜索班级");
        btnclassselect.addActionListener(new
                                         classupdate_btnclassselect_actionAdapter(this));
        btnclassupdate.setBounds(new Rectangle(376, 515, 149, 40));
        btnclassupdate.setFont(new java.awt.Font("宋体", Font.PLAIN, 20));
        btnclassupdate.setText("修改班级");
        btnclassupdate.addActionListener(new
                                         classupdate_btnclassupdate_actionAdapter(this));
        btnexit.setBounds(new Rectangle(545, 516, 149, 39));
        btnexit.setFont(new java.awt.Font("宋体", Font.PLAIN, 20));
        btnexit.setText("退出修改");
        jLabel14.setFont(new java.awt.Font("华文彩云", Font.PLAIN, 50));
        jLabel14.setHorizontalAlignment(SwingConstants.CENTER);
        jLabel14.setText("修改班级信息");
        jLabel14.setBounds(new Rectangle(7, 1, 848, 86));
        this.add(jLabel14);
        this.add(jTableHeader1);
        this.add(tbclass);
        this.add(jLabel13);
        this.add(jLabel8);
        this.add(txtclassno);
        this.add(txtclassmastername);
        this.add(jLabel4);
        this.add(cboclasscategory);
        this.add(jLabel10);
        this.add(cboclassSemester);
        this.add(jLabel6);
        this.add(cbobeginstimeyear);
        this.add(jLabel12);
        this.add(cbobeginstimemonth);
        this.add(jLabel1);
        this.add(cbobeginstimedate);
        this.add(jLabel7);
        this.add(jLabel9);
        this.add(cboendtimeyear);
        this.add(jLabel3);
        this.add(cboendtimemonth);
        this.add(jLabel2);
        this.add(cboendtimedate);
        this.add(jLabel5);
        this.add(txaclassRemarks);
        this.add(btnexit);
        this.add(btnclassselect);
        this.add(btnclassupdate);
        this.add(jLabel11);
    }

    //班级年级
    String Semester[] = {"", "S1", "S2", "Y2"};
    //班级类别
    String category[] = {"", "脱产班", "周末班"};
    //开学时间(年)
    String beginstimeyear[] = {"", "2006", "2007", "2008", "2009"};
    //开学时间(月)
    String beginstimemonth[] = {"", "01", "02", "03", "04", "05", "06", "07",
                               "08",
                               "09",
                               "10", "11", "12"};
    //开学时间(日)
    String beginstimedate[] = {"", "01", "02", "03", "04", "05", "06", "07",
                              "08",
                              "09",
                              "10", "11", "12", "13", "14", "15", "16", "17",
                              "18", "19", "20", "21", "22", "23", "24", "25",
                              "26", "27", "28", "29", "30", "31"};
    //毕业时间(年)
    String endtimeyear[] = {"", "2006", "2007", "2008", "2009"};
    //毕业时间(月)
    String endtimemonth[] = {"", "01", "02", "03", "04", "05", "06", "07", "08",
                            "09",
                            "10", "11", "12"};
    //毕业时间(日)
    String endtimedate[] = {"", "01", "02", "03", "04", "05", "06", "07", "08",
                           "09",
                           "10", "11", "12", "13", "14", "15", "16", "17",
                           "18", "19", "20", "21", "22", "23", "24", "25",
                           "26", "27", "28", "29", "30", "31"};
    JLabel jLabel1 = new JLabel();
    JLabel jLabel2 = new JLabel();
    JLabel jLabel3 = new JLabel();
    JComboBox cboclassSemester = new JComboBox(Semester);
    JLabel jLabel4 = new JLabel();
    JLabel jLabel5 = new JLabel();
    JLabel jLabel6 = new JLabel();
    JComboBox cboclasscategory = new JComboBox(category);
    String Head[] = {"班级编号", "班主任姓名", "班级类型", "学期", "开学时间", "毕业时间", "备注"};
    DefaultTableModel mod = new DefaultTableModel(Head, 0);
    JTable tbclass = new JTable(mod);
    JLabel jLabel7 = new JLabel();
    JLabel jLabel8 = new JLabel();
    JTextArea txaclassRemarks = new JTextArea();
    JComboBox cboendtimeyear = new JComboBox(endtimeyear);
    JComboBox cbobeginstimedate = new JComboBox(beginstimedate);
    JComboBox cbobeginstimeyear = new JComboBox(beginstimeyear);
    JComboBox cbobeginstimemonth = new JComboBox(beginstimemonth);
    JTextField txtclassno = new JTextField();
    JLabel jLabel9 = new JLabel();
    JLabel jLabel10 = new JLabel();
    JComboBox cboendtimemonth = new JComboBox(endtimemonth);
    JLabel jLabel11 = new JLabel();
    JComboBox cboendtimedate = new JComboBox(endtimedate);
    JTextField txtclassmastername = new JTextField();
    JLabel jLabel12 = new JLabel();
    JLabel jLabel13 = new JLabel();
    JTableHeader jTableHeader1 = tbclass.getTableHeader();
    JButton btnclassselect = new JButton();
    JButton btnclassupdate = new JButton();
    JButton btnexit = new JButton();
    //班级类别classcategory
    String categoryname = this.cboclasscategory.getSelectedItem().
                          toString();

    //学期classSemester
    String Semestername = this.cboclassSemester.getSelectedItem().
                          toString();

    //开学时间(年,月,日)
    String beginstimenameyear = this.cbobeginstimeyear.getSelectedItem().
                                toString();

    String beginstimenamemonth = this.cbobeginstimemonth.
                                 getSelectedItem().
                                 toString();

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -