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

📄 stuframe.java

📁 java应用程序 这个是自己第一次写的东西 还是初学
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
/* * StuFrame.java * * Created on 2008年9月22日, 下午10:49 */import  javax.swing.*;import  java.awt.*;/** * * @author  Administrator */public class StuFrame extends javax.swing.JFrame {    /** Creates new form StuFrame */    public StuFrame() {        initComponents();       jList1.setListData(students.stuList.toArray());        Toolkit kit = Toolkit.getDefaultToolkit();        Dimension   screenSize = kit.getScreenSize();        setLocation((screenSize.width-getSize().width)/2,                        (screenSize.height-getSize().height)/2);        setTitle("学生成绩管理系统");    }    /** 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")    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents    private void initComponents() {        jButton1 = new javax.swing.JButton();        jButton2 = new javax.swing.JButton();        jButton3 = new javax.swing.JButton();        jLabel1 = new javax.swing.JLabel();        jLabel2 = new javax.swing.JLabel();        txtID = new javax.swing.JTextField();        jLabel3 = new javax.swing.JLabel();        txtName = new javax.swing.JTextField();        jLabel4 = new javax.swing.JLabel();        jScrollPane2 = new javax.swing.JScrollPane();        jList1 = new javax.swing.JList();        txtCla = new javax.swing.JTextField();        jLabel6 = new javax.swing.JLabel();        txtMajor = new javax.swing.JTextField();        jLabel7 = new javax.swing.JLabel();        jLabel8 = new javax.swing.JLabel();        txtGrade = new javax.swing.JTextField();        jButton4 = new javax.swing.JButton();        jButton5 = new javax.swing.JButton();        jButton6 = new javax.swing.JButton();        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);        jButton1.setText("录入");        jButton1.addActionListener(new java.awt.event.ActionListener() {            public void actionPerformed(java.awt.event.ActionEvent evt) {                jButton1ActionPerformed(evt);            }        });        jButton2.setText("成绩统计");        jButton2.addActionListener(new java.awt.event.ActionListener() {            public void actionPerformed(java.awt.event.ActionEvent evt) {                jButton2ActionPerformed(evt);            }        });        jButton3.setText("成绩查询");        jButton3.addActionListener(new java.awt.event.ActionListener() {            public void actionPerformed(java.awt.event.ActionEvent evt) {                jButton3ActionPerformed(evt);            }        });        jLabel1.setText("<-选择学生信息");        jLabel2.setText("学生基本信息输入:");        txtID.addActionListener(new java.awt.event.ActionListener() {            public void actionPerformed(java.awt.event.ActionEvent evt) {                txtIDActionPerformed(evt);            }        });        jLabel3.setText("学号");        txtName.addActionListener(new java.awt.event.ActionListener() {            public void actionPerformed(java.awt.event.ActionEvent evt) {                txtNameActionPerformed(evt);            }        });        jLabel4.setText("姓名");        jScrollPane2.setViewportView(jList1);        txtCla.addActionListener(new java.awt.event.ActionListener() {            public void actionPerformed(java.awt.event.ActionEvent evt) {                txtClaActionPerformed(evt);            }        });        jLabel6.setText("班级");        jLabel7.setText("专业");        jLabel8.setText("年级");        txtGrade.addActionListener(new java.awt.event.ActionListener() {            public void actionPerformed(java.awt.event.ActionEvent evt) {                txtGradeActionPerformed(evt);            }        });        jButton4.setText("课程信息录入");        jButton4.addActionListener(new java.awt.event.ActionListener() {            public void actionPerformed(java.awt.event.ActionEvent evt) {                jButton4ActionPerformed(evt);            }        });        jButton5.setText("考试成绩输入");        jButton6.setText("删除");        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());        getContentPane().setLayout(layout);        layout.setHorizontalGroup(            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)            .addGroup(layout.createSequentialGroup()                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)                    .addGroup(layout.createSequentialGroup()                        .addContainerGap()                        .addComponent(jButton4)                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)                        .addComponent(jButton5))                    .addGroup(layout.createSequentialGroup()                        .addGap(47, 47, 47)                        .addComponent(jButton6))                    .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 188, javax.swing.GroupLayout.PREFERRED_SIZE))                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 21, Short.MAX_VALUE)                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()                            .addGap(66, 66, 66)                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)                                .addComponent(jLabel2)                                .addGroup(layout.createSequentialGroup()                                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)                                        .addComponent(jLabel6)                                        .addComponent(jLabel8)                                        .addComponent(jLabel3)                                        .addComponent(jLabel7)                                        .addComponent(jLabel4))                                    .addGap(26, 26, 26)                                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)                                        .addComponent(txtName, javax.swing.GroupLayout.DEFAULT_SIZE, 58, Short.MAX_VALUE)                                        .addComponent(txtCla, javax.swing.GroupLayout.DEFAULT_SIZE, 58, Short.MAX_VALUE)                                        .addComponent(txtID, javax.swing.GroupLayout.DEFAULT_SIZE, 58, Short.MAX_VALUE)                                        .addComponent(txtMajor, javax.swing.GroupLayout.DEFAULT_SIZE, 58, Short.MAX_VALUE)                                        .addComponent(txtGrade, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 58, Short.MAX_VALUE)                                        .addComponent(jButton1))))

⌨️ 快捷键说明

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