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

📄 classdel.java~24~

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

import java.awt.BorderLayout;

import javax.swing.JPanel;
import java.awt.Rectangle;
import javax.swing.JTextArea;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.BorderFactory;
import javax.swing.JTable;
import javax.swing.table.JTableHeader;
import javax.swing.table.DefaultTableModel;
import javax.swing.JButton;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.sql.*;
import javax.swing.JOptionPane;
import java.awt.event.KeyEvent;
import java.awt.event.KeyAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseAdapter;

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

    private void jbInit() throws Exception {
        this.setLayout(null);
        jPanel1.setBorder(BorderFactory.createEtchedBorder());
        jPanel1.setBounds(new Rectangle( -1, 1, 599, 315));
        jPanel1.setLayout(null);
        txaclassRemarks.setBounds(new Rectangle(367, 225, 176, 45));
        cboendtimeyear.setBounds(new Rectangle(68, 247, 63, 23));
        jLabel1.setText("班级类别:");
        jLabel1.setBounds(new Rectangle(406, 200, 60, 15));
        jLabel2.setText("日");
        jLabel2.setBounds(new Rectangle(284, 226, 12, 15));
        cbobeginstimedate.setBounds(new Rectangle(230, 220, 51, 23));
        jLabel3.setText("日");
        jLabel3.setBounds(new Rectangle(284, 252, 12, 15));
        cbobeginstimeyear.setBounds(new Rectangle(68, 220, 63, 23));
        cbobeginstimemonth.setBounds(new Rectangle(154, 220, 52, 23));
        txtclassno.setEditable(false);
        txtclassno.setBounds(new Rectangle(68, 196, 65, 20));
        cboclassSemester.setBounds(new Rectangle(332, 196, 63, 23));
        jLabel4.setText("月");
        jLabel4.setBounds(new Rectangle(212, 251, 12, 15));
        jLabel5.setText("班级编号:");
        jLabel5.setBounds(new Rectangle(7, 198, 66, 15));
        jLabel6.setText("备注:");
        jLabel6.setBounds(new Rectangle(326, 223, 36, 15));
        jLabel7.setText("学期:");
        jLabel7.setBounds(new Rectangle(291, 200, 36, 15));
        cboclasscategory.setBounds(new Rectangle(470, 196, 73, 23));
        jLabel8.setText("月");
        jLabel8.setBounds(new Rectangle(212, 224, 12, 15));
        jLabel9.setText("班主任:");
        jLabel9.setBounds(new Rectangle(138, 199, 48, 15));
        cboendtimemonth.setBounds(new Rectangle(154, 247, 52, 23));
        jLabel10.setText("年");
        jLabel10.setBounds(new Rectangle(138, 224, 12, 15));
        cboendtimedate.setBounds(new Rectangle(230, 247, 51, 23));
        txtclassmastername.setBounds(new Rectangle(187, 196, 97, 20));
        jLabel11.setText("毕业时间:");
        jLabel11.setBounds(new Rectangle(5, 251, 60, 15));
        jLabel12.setText("年");
        jLabel12.setBounds(new Rectangle(138, 251, 12, 15));
        jLabel13.setText("开学时间:");
        jLabel13.setBounds(new Rectangle(6, 223, 60, 15));
        tbclass.setBounds(new Rectangle(7, 26, 578, 166));
        tbclass.addMouseListener(new classdel_tbclass_mouseAdapter(this));
        tbclass.addKeyListener(new classdel_tbclass_keyAdapter(this));
        jTableHeader1.setBounds(new Rectangle(7, 1, 575, 24));
        btnclassselect.setBounds(new Rectangle(29, 285, 81, 23));
        btnclassselect.setText("搜索班级");
        btnclassselect.addActionListener(new
                                         classdel_btnclassselect_actionAdapter(this));
        btnexit.setBounds(new Rectangle(376, 285, 81, 23));
        btnexit.setText("退出");
        classdel.setBounds(new Rectangle(174, 286, 81, 23));
        classdel.setText("删除班级");
        classdel.addActionListener(new classdel_classupdate_actionAdapter(this));
        jPanel1.add(jTableHeader1);
        jPanel1.add(tbclass);
        jPanel1.add(jLabel5);
        jPanel1.add(txtclassno);
        jPanel1.add(jLabel9);
        jPanel1.add(txtclassmastername);
        jPanel1.add(jLabel7);
        jPanel1.add(cboclassSemester);
        jPanel1.add(jLabel1);
        jPanel1.add(cboclasscategory);
        jPanel1.add(jLabel8);
        jPanel1.add(jLabel10);
        jPanel1.add(cbobeginstimemonth);
        jPanel1.add(jLabel2);
        jPanel1.add(cbobeginstimedate);
        jPanel1.add(jLabel13);
        jPanel1.add(jLabel12);
        jPanel1.add(jLabel4);
        jPanel1.add(cboendtimedate);
        jPanel1.add(jLabel3);
        jPanel1.add(cboendtimemonth);
        jPanel1.add(jLabel11);
        jPanel1.add(cboendtimeyear);
        jPanel1.add(cbobeginstimeyear);
        jPanel1.add(jLabel6);
        jPanel1.add(txaclassRemarks);
        jPanel1.add(btnclassselect);
        jPanel1.add(btnexit);
        jPanel1.add(classdel);
        this.add(jPanel1);
    }

    String Head[] = {"班级编号", "班主任姓名", "班级类型", "学期", "开学时间", "毕业时间", "备注"};
    DefaultTableModel mod = new DefaultTableModel(Head, 0);
    JTable tbclass = new JTable(mod);
    JTableHeader jTableHeader1 = tbclass.getTableHeader();
    JPanel jPanel1 = new JPanel();
    JTextArea txaclassRemarks = new JTextArea();
    //班级年级
    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"};
    JComboBox cboendtimeyear = new JComboBox(endtimeyear);
    JLabel jLabel1 = new JLabel();
    JLabel jLabel2 = new JLabel();
    JComboBox cbobeginstimedate = new JComboBox(beginstimedate);
    JLabel jLabel3 = new JLabel();
    JComboBox cbobeginstimeyear = new JComboBox(beginstimeyear);
    JComboBox cbobeginstimemonth = new JComboBox(beginstimemonth);
    JTextField txtclassno = new JTextField();
    JComboBox cboclassSemester = new JComboBox(Semester);
    JLabel jLabel4 = new JLabel();
    JLabel jLabel5 = new JLabel();
    JLabel jLabel6 = new JLabel();
    JLabel jLabel7 = new JLabel();
    JComboBox cboclasscategory = new JComboBox(category);
    JLabel jLabel8 = new JLabel();
    JLabel jLabel9 = new JLabel();
    JComboBox cboendtimemonth = new JComboBox(endtimemonth);
    JLabel jLabel10 = new JLabel();
    JComboBox cboendtimedate = new JComboBox(endtimedate);
    JTextField txtclassmastername = new JTextField();
    JLabel jLabel11 = new JLabel();
    JLabel jLabel12 = new JLabel();
    JLabel jLabel13 = new JLabel();
    //表头
    JButton btnclassselect = new JButton();
    JButton btnexit = new JButton();
    //班级类别classcategory
    String categoryname = this.cboclasscategory.getSelectedItem().
                          toString();

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

⌨️ 快捷键说明

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