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

📄 stuinformationjframe.java

📁 java编写的与SQL数据连接的好例子~~功能很完善,可以做实训直接交
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
/* * stuInformationJFrame.java * * Created on 2008年6月18日, 上午11:56 */package stuMS;import javax.swing.*;import javax.swing.event.*;import java.awt.*;import java.awt.event.*;/** * * @author  Administrator */public class stuInformationJFrame extends javax.swing.JFrame{    //int intX = 110,intY = 4;    /** Creates new form stuInformationJFrame */    public stuInformationJFrame() {        //contentPane = this.getContentPane();        initComponents();        downInit();        //controlPanel.add(searchStuInformationButton);         this.validate();        this.setLocationRelativeTo(null);    }    public void downInit(){        /*searchStuInformationButton.setText("查 询");        searchStuInformationButton.setFont(new Font("Dialog",0,12));        controlPanel.add(searchStuInformationButton);        searchStuInformationButton.setBounds(68, 4, 62, 30);        addStuInformationButton.setText("添 加");        addStuInformationButton.setFont(new Font("Dialog",0,12));        controlPanel.add(addStuInformationButton);        alterStuInformationButton.setText("编 辑");        alterStuInformationButton.setFont(new Font("Dialog",0,12));        controlPanel.add(alterStuInformationButton);        deleteStuInformationButton.setText("删 除");        deleteStuInformationButton.setFont(new Font("Dialog",0,12));        controlPanel.add(deleteStuInformationButton);        saveStuInformationButton.setText("保 存");        saveStuInformationButton.setFont(new Font("Dialog",0,12));        controlPanel.add(saveStuInformationButton);        clearStuInformationButton.setText("清 除");        clearStuInformationButton.setFont(new Font("Dialog",0,12));        controlPanel.add(clearStuInformationButton);        exitButton.setText("退出");        exitButton.setFont(new Font("Dialog",0,12));        controlPanel.add(exitButton);                        searchStuInformationButton.addActionListener(this);        addStuInformationButton.addActionListener(this);        alterStuInformationButton.addActionListener(this);        deleteStuInformationButton.addActionListener(this);        saveStuInformationButton.addActionListener(this);        clearStuInformationButton.addActionListener(this);        exitButton.addActionListener(this);        clearStuInformationButton.addActionListener(this);                alterStuInformationButton.setEnabled(false);        deleteStuInformationButton.setEnabled(false);        saveStuInformationButton.setEnabled(false);        clearStuInformationButton.setEnabled(false);*/    }    void setNull(){        Sno.setText(null);        Sname.setText(null);        Ssex.setText(null);        Sethnic.setText(null);        Sbirth.setText(null);        Sdate.setText(null);        Smajor.setText(null);        Scollege.setText(null);        Shometown.setText(null);    }    /** 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.     */    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents    private void initComponents() {        searchStuInformationButton = new javax.swing.JButton();        addStuInformationButton = new javax.swing.JButton();        alterStuInformationButton = new javax.swing.JButton();        deleteStuInformationButton = new javax.swing.JButton();        saveStuInformationButton = new javax.swing.JButton();        clearStuInformationButton = new javax.swing.JButton();        exitButton = new javax.swing.JButton();        jPanel1 = new javax.swing.JPanel();        jLabel1 = new javax.swing.JLabel();        jLabel2 = new javax.swing.JLabel();        Sno = new javax.swing.JTextField();        Sname = new javax.swing.JTextField();        jLabel3 = new javax.swing.JLabel();        Ssex = new javax.swing.JTextField();        jLabel4 = new javax.swing.JLabel();        Sethnic = new javax.swing.JTextField();        jLabel5 = new javax.swing.JLabel();        Sbirth = new javax.swing.JTextField();        jLabel6 = new javax.swing.JLabel();        Sdate = new javax.swing.JTextField();        jLabel7 = new javax.swing.JLabel();        Smajor = new javax.swing.JTextField();        jLabel8 = new javax.swing.JLabel();        Scollege = new javax.swing.JTextField();        jLabel9 = new javax.swing.JLabel();        Shometown = new javax.swing.JTextField();        controlPanel = new javax.swing.JPanel();        searchStuInformationButton.setText("jButton1");        searchStuInformationButton.setAlignmentX(0.5F);        searchStuInformationButton.setDoubleBuffered(true);        searchStuInformationButton.addActionListener(new java.awt.event.ActionListener() {            public void actionPerformed(java.awt.event.ActionEvent evt) {                searchStuInformationButtonActionPerformed(evt);            }        });        addStuInformationButton.setText("jButton1");        addStuInformationButton.addActionListener(new java.awt.event.ActionListener() {            public void actionPerformed(java.awt.event.ActionEvent evt) {                addStuInformationButtonActionPerformed(evt);            }        });        alterStuInformationButton.setText("jButton2");        alterStuInformationButton.addActionListener(new java.awt.event.ActionListener() {            public void actionPerformed(java.awt.event.ActionEvent evt) {                alterStuInformationButtonActionPerformed(evt);            }        });        deleteStuInformationButton.setText("jButton3");        deleteStuInformationButton.addActionListener(new java.awt.event.ActionListener() {            public void actionPerformed(java.awt.event.ActionEvent evt) {                deleteStuInformationButtonActionPerformed(evt);            }        });        saveStuInformationButton.setText("jButton4");        saveStuInformationButton.addActionListener(new java.awt.event.ActionListener() {            public void actionPerformed(java.awt.event.ActionEvent evt) {                saveStuInformationButtonActionPerformed(evt);            }        });        clearStuInformationButton.setText("jButton5");        clearStuInformationButton.addActionListener(new java.awt.event.ActionListener() {            public void actionPerformed(java.awt.event.ActionEvent evt) {                clearStuInformationButtonActionPerformed(evt);            }        });        exitButton.setText("jButton6");        exitButton.addActionListener(new java.awt.event.ActionListener() {            public void actionPerformed(java.awt.event.ActionEvent evt) {                exitButtonActionPerformed(evt);            }        });        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);        setTitle("学生综合信息管理");        jLabel1.setText("学    号:");        jLabel2.setText("姓    名:");        Sno.setEditable(false);        Sname.setEditable(false);        jLabel3.setText("性    别:");        Ssex.setEditable(false);        jLabel4.setText("民    族:");        Sethnic.setEditable(false);        jLabel5.setText("出生日期:");        Sbirth.setEditable(false);        jLabel6.setText("入学时间:");        Sdate.setEditable(false);        jLabel7.setText("专    业:");        Smajor.setEditable(false);

⌨️ 快捷键说明

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