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

📄 testsystemfrom.java~77~

📁 这个是学生考试系统,里面有完整的代码加数据库SQL server
💻 JAVA~77~
📖 第 1 页 / 共 2 页
字号:
package testsystem;

import java.awt.*;

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

public class TestSystemFrom extends JFrame {
    private ImageIcon img1 = new ImageIcon("img\\admin.png");
    private ImageIcon img2 = new ImageIcon("img\\readerinfo.png");
    private ImageIcon img3 = new ImageIcon("img\\backbook.png");
    private ImageIcon img4 = new ImageIcon("img\\borrowbook.png");
    private ImageIcon img5 = new ImageIcon("img\\exit.png");
    ImageIcon img6 = new ImageIcon("img/java.gif");
    Teacher laoshi=new Teacher();
    public TestSystemFrom() {
        try {
            jbInit();
        } catch (Exception exception) {
            exception.printStackTrace();
        }
    }

    private void jbInit() throws Exception {

        getContentPane().setLayout(null);
        setTitle("欢迎来到学员考试系统!");
        jLabel1.setFont(new java.awt.Font("楷体", Font.BOLD, 32));
        this.getContentPane().setBackground(new Color(139, 176, 255));
        this.setLocale(new java.util.Locale("zh", "CN", ""));
        this.setJMenuBar(jMenuBar1);
        this.setResizable(false);
        jMenu1.setText("教师操作");
        jm1.setText("添加用户");
        jm1.addActionListener(new TestSystemFrom_jm1_actionAdapter(this));
        jMenu2.setText("考试系统");
        jMenu3.setText("帮助");
        jLabel1.setHorizontalAlignment(SwingConstants.CENTER);
        jLabel1.setText("欢 迎 使 用 本 软 件");
        jLabel1.setBounds(new Rectangle(160, 8, 373, 47));
        jm2.setText("删除用户");
        jm2.addActionListener(new TestSystemFrom_jm2_actionAdapter(this));
        jm3.setText("添加试题");
        jm3.addActionListener(new TestSystemFrom_jm3_actionAdapter(this));
        jm4.setText("删除试题");
        jm4.addActionListener(new TestSystemFrom_jm4_actionAdapter(this));
        jMenuItem7.setText("关于");
        jMenuItem7.addActionListener(new
                                     TestSystemFrom_jMenuItem7_actionAdapter(this));
        jiaoshi.setBounds(new Rectangle(19, 59, 90, 49));
        jiaoshi.setIcon(img1);
        jiaoshi.addActionListener(new TestSystemFrom_jiaoshi_actionAdapter(this));
        stu.setBounds(new Rectangle(160, 59, 88, 49));
        stu.setIcon(img2);
        stu.addActionListener(new TestSystemFrom_stu_actionAdapter(this));
        kaoshi.setBounds(new Rectangle(298, 59, 89, 48));
        kaoshi.setToolTipText("");
        kaoshi.setIcon(img3);
        kaoshi.addActionListener(new TestSystemFrom_kaoshi_actionAdapter(this));
        jButton1.setBounds(new Rectangle(446, 59, 91, 47));
        jButton1.setIcon(img4);
        jButton1.addActionListener(new TestSystemFrom_jButton1_actionAdapter(this));
        jButton2.setBounds(new Rectangle(589, 59, 83, 46));
        jButton2.setIcon(img5);
        jButton2.addActionListener(new TestSystemFrom_jButton2_actionAdapter(this));
        jLabel2.setForeground(Color.red);
        jLabel2.setHorizontalAlignment(SwingConstants.CENTER);
        jLabel2.setText("教 师 管 理");
        jLabel2.setBounds(new Rectangle(19, 119, 88, 26));
        jLabel3.setForeground(Color.blue);
        jLabel3.setHorizontalAlignment(SwingConstants.CENTER);
        jLabel3.setText("学 员 操 作");
        jLabel3.setBounds(new Rectangle(160, 119, 87, 26));
        jLabel4.setForeground(Color.yellow);
        jLabel4.setHorizontalAlignment(SwingConstants.CENTER);
        jLabel4.setText("开 始 考 试");
        jLabel4.setBounds(new Rectangle(298, 120, 89, 26));
        jLabel5.setForeground(Color.magenta);
        jLabel5.setHorizontalAlignment(SwingConstants.CENTER);
        jLabel5.setText("关 于 作 者");
        jLabel5.setBounds(new Rectangle(447, 117, 89, 32));
        jLabel6.setForeground(Color.orange);
        jLabel6.setHorizontalAlignment(SwingConstants.CENTER);
        jLabel6.setText("退出系统");
        jLabel6.setBounds(new Rectangle(591, 116, 79, 33));
        jLabel7.setHorizontalAlignment(SwingConstants.CENTER);
        jLabel7.setIcon(img6);
        jLabel7.setBounds(new Rectangle(0, 131, 699, 459));
        jMenu4.setText("学员操作");
        jm5.setText("计算器");
        jm5.addActionListener(new TestSystemFrom_jm5_actionAdapter(this));
        jMenuItem1.setText("修改密码");
        jMenuItem1.addActionListener(new
                                     TestSystemFrom_jMenuItem1_actionAdapter(this));
        jMenuItem6.setText("考生须知");
        jMenuItem6.addActionListener(new
                                     TestSystemFrom_jMenuItem6_actionAdapter(this));
        jMenuItem5.setText("开始考试");
        jMenuItem5.addActionListener(new
                                     TestSystemFrom_jMenuItem5_actionAdapter(this));
        jMenuItem3.setText("退出程序         ALT-F4");
        jMenuItem3.addActionListener(new
                                     TestSystemFrom_jMenuItem3_actionAdapter(this));
        jMenuItem4.setText("退出程序   ATL-F4");
        jMenuItem4.addActionListener(new
                                     TestSystemFrom_jMenuItem4_actionAdapter(this));
        jMenuBar1.add(jMenu1);
        jMenuBar1.add(jMenu4);
        jMenuBar1.add(jMenu2);
        jMenuBar1.add(jMenu3);
        jMenu1.add(jm1);
        jMenu1.add(jm2);
        jMenu1.addSeparator();
        jMenu1.add(jMenuItem1);
        jMenu1.addSeparator();
        jMenu1.add(jm3);
        jMenu1.add(jm4);
        jMenu1.add(jMenuItem3);
        jMenu2.add(jMenuItem6);
        jMenu2.add(jMenuItem5);
        jMenu2.addSeparator();
        jMenu3.add(jMenuItem7);
        this.getContentPane().add(jLabel1);
        this.getContentPane().add(jiaoshi);
        this.getContentPane().add(stu);
        this.getContentPane().add(kaoshi);
        this.getContentPane().add(jButton1);
        this.getContentPane().add(jButton2);
        this.getContentPane().add(jLabel2);
        this.getContentPane().add(jLabel3);
        this.getContentPane().add(jLabel4);
        this.getContentPane().add(jLabel5);
        this.getContentPane().add(jLabel6);
        this.getContentPane().add(jLabel7);

        jMenu4.add(jm5);
        jMenu4.add(jMenuItem4);

    }

    public static void main(String[] args) {
        TestSystemFrom testsystemfrom = new TestSystemFrom();
    }

    JMenuBar jMenuBar1 = new JMenuBar();
    JMenu jMenu1 = new JMenu();
    JMenuItem jm1 = new JMenuItem();
    JMenu jMenu2 = new JMenu();
    JMenu jMenu3 = new JMenu();
    JLabel jLabel1 = new JLabel();
    JMenuItem jm2 = new JMenuItem();
    JMenuItem jm3 = new JMenuItem();
    JMenuItem jm4 = new JMenuItem();
    JMenuItem jMenuItem7 = new JMenuItem();
    JButton jiaoshi = new JButton();
    JButton stu = new JButton();
    JButton kaoshi = new JButton();
    JButton jButton1 = new JButton();
    JButton jButton2 = new JButton();
    JLabel jLabel2 = new JLabel();
    JLabel jLabel3 = new JLabel();
    JLabel jLabel4 = new JLabel();
    JLabel jLabel5 = new JLabel();
    JLabel jLabel6 = new JLabel();
    JLabel jLabel7 = new JLabel();
    JMenu jMenu4 = new JMenu();
    JMenuItem jm5 = new JMenuItem();
    Student sd=new Student();
    JMenuItem jMenuItem1 = new JMenuItem();
    JMenuItem jMenuItem6 = new JMenuItem();
    JMenuItem jMenuItem5 = new JMenuItem();
    JMenuItem jMenuItem3 = new JMenuItem();
    JMenuItem jMenuItem4 = new JMenuItem();
    public void jiaoshi_actionPerformed(ActionEvent e) {
        laoshi.setBounds(190,140,375,305);
        laoshi.show();
    }

    public void jm1_actionPerformed(ActionEvent e) {
        tjStu stu1=new tjStu();
        stu1.setBounds(190, 140, 400, 298);
        stu1.show();
    }

    public void jm5_actionPerformed(ActionEvent e) {
        sd.setBounds(190, 140, 227, 221);
        sd.show();
    }

    public void stu_actionPerformed(ActionEvent e) {
        sd.setBounds(190, 140, 227, 221);
        sd.show();

    }

    public void jMenuItem1_actionPerformed(ActionEvent e) {
        PassWordFrom pwd1=new PassWordFrom();
        pwd1.setBounds(190,140,400,300);
        pwd1.show();
    }

    public void jm2_actionPerformed(ActionEvent e) {
        DelFrom del=new DelFrom();
        del.setBounds(190,140,376,300);
        del.show();
    }

    public void jMenuItem7_actionPerformed(ActionEvent e) {
        guanyuFrom gy=new guanyuFrom();
        gy.setBounds(190,140,694,380);
        gy.show();
    }

    public void jButton1_actionPerformed(ActionEvent e) {
        guanyuFrom gy=new guanyuFrom();
        gy.setBounds(190,140,694,380);
        gy.show();
    }

    public void jButton2_actionPerformed(ActionEvent e) {
        int p=JOptionPane.showConfirmDialog(null,"您真的要退出吗?","提示",JOptionPane.YES_NO_OPTION);
        if(p==0)
        {
            System.exit(0);
        }
        else
        {
            return;
        }

    }

    public void jm3_actionPerformed(ActionEvent e) {
        tjstFrom st=new tjstFrom();
        st.setBounds(190,140,404,403);
        st.show();
    }

    public void jm4_actionPerformed(ActionEvent e) {

⌨️ 快捷键说明

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