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

📄 frame_seeall.java

📁 学生成绩管理系统
💻 JAVA
字号:
package teamwork;

import java.awt.*;

import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

/**
 * <p>Title: teamwork</p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2007</p>
 *
 * <p>Company: </p>
 *
 * @author yeliang
 * @version 1.0
 */
public class Frame_seeall extends JFrame {
    public Frame_seeall() {
        try {
            setDefaultCloseOperation(EXIT_ON_CLOSE);
            jbInit();
        } catch (Exception exception) {
            exception.printStackTrace();
        }
    }

    private void jbInit() throws Exception {
        getContentPane().setLayout(null);
        jScrollPane1.getViewport().setBackground(new Color(100, 180, 255));
        jScrollPane1.setBounds(new Rectangle(25, 30, 330, 200));
        jButton_seeall_back.setForeground(Color.orange);
        jButton_seeall_back.addActionListener(new
                Frame_seeall_jButton_seeall_back_actionAdapter(this));
        this.getContentPane().add(jButton_seeall_back);
        this.getContentPane().add(jScrollPane1);
        jScrollPane1.getViewport().add(jTable1);
        jButton_seeall_back.setBounds(new Rectangle(42, 245, 300, 32));
        jButton_seeall_back.setFont(new java.awt.Font("Dialog", Font.BOLD, 15));
        jButton_seeall_back.setText("返       回");
        this.getContentPane().setBackground(new Color(100, 180, 255));

        jTable1.getColumnModel().getColumn(0).setHeaderValue("姓名");
        jTable1.getColumnModel().getColumn(1).setHeaderValue("性别");
        jTable1.getColumnModel().getColumn(2).setHeaderValue("班级");
        jTable1.getColumnModel().getColumn(3).setHeaderValue("学号");
        jTable1.setBackground(new Color(100,180,255));

        s.readdata();
        //int lines = 0;
        for(int i=0;i<s.num_student;i++){
            jTable1.setValueAt(s.students[i].name,i,0);
            jTable1.setValueAt(s.students[i].sex,i,1);
            jTable1.setValueAt(s.students[i].classNo,i,2);
            jTable1.setValueAt(s.students[i].id,i,3);
        }
    }

    public static void main(String[] args) {
        Frame_seeall frame_seeall = new Frame_seeall();
    }

    JScrollPane jScrollPane1 = new JScrollPane();
    JButton jButton_seeall_back = new JButton();
    JTable jTable1 = new JTable(50,4);
    studentDA s = new studentDA();

    public void jButton_seeall_back_actionPerformed(ActionEvent e) {
        this.dispose();
        Frame_find f = new Frame_find();
        f.setSize(500,200);
        f.jButton_back.setBounds(new Rectangle(8, 120, 480, 40));
        f.setVisible(true);
    }

}


class Frame_seeall_jButton_seeall_back_actionAdapter implements ActionListener {
    private Frame_seeall adaptee;
    Frame_seeall_jButton_seeall_back_actionAdapter(Frame_seeall adaptee) {
        this.adaptee = adaptee;
    }

    public void actionPerformed(ActionEvent e) {
        adaptee.jButton_seeall_back_actionPerformed(e);
    }
}

⌨️ 快捷键说明

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