Java实现小学生数学考试系统(超级简易版 源码)

	一直忘了给源码 (可不是我懒~
	大二上学期写的,有点菜,大佬误骂..
	如果对您有帮助请点赞哦~~

登录界面 Login_Interface.java


import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Font;
import java.awt.GridBagLayout;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import java.io.IOException;

import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.UIManager;

public class Login_Interface extends JFrame {
   

    private static final long serialVersionUID = 1L;  //定义程序序列化,1L是默认定义

    protected static String s1;
    protected static String s2;
    protected static String s3;

    private JLabel jl1 = new JLabel("欢迎来到考试系统");
    private JLabel jl2 = new JLabel("请填写下列信息");
    private JLabel jl3 = new JLabel("    ");
    private JLabel jl4 = new JLabel("        ");

    private JLabel JLName = new JLabel("姓名:");
    private JLabel JLMagic = new JLabel("专业:");
    private JLabel JLClass = new JLabel("班级:");

    private JTextField JTName = new JTextField(10);
    private JTextField JTMagic = new JTextField(10);
    private JTextField JTClass = new JTextField(10);

    private JButton JB1 = new JButton("开始考试");
    private JButton JB2 = new JButton("重置");
    private JButton JBave = new JButton("平均分查看");

    private JPanel jp1 = new JPanel();
    private JPanel jp2 = new JPanel();
    private JPanel jp3 = new JPanel();
    private JPanel jp4 = new JPanel();
    private JPanel jp5 = new JPanel();
    private JPanel jp6 = new JPanel();
    private JPanel jp7 = new JPanel();

    private void Event() {
   

        JB1.addActionListener(new ActionListener() {
   
            @Override
            public void actionPerformed(ActionEvent e) {
   
                if(JTName.getText().equals("") || JTClass.getText().equals("") || JTMagic.getText().equals("")) {
   
                    String s = "请输入完整信息";
                    JOptionPane.showMessageDialog(null, s,"提示",JOptionPane.ERROR_MESSAGE);

                }else {
   
                    setVisible(false);
                    dispose();
                    s1 = JTName.getText();
                    s2 = JTClass.getText();
                    s3 = JTMagic.getText();
                    new Test_Interface();
                }
            }
        });
        JB2.addActionListener(new ActionListener() {
   
            @Override
            public void actionPerformed(ActionEvent e) {
   
                JTName.setText(null);
                JTMagic.setText(null);
                JTClass.setText(null);
            }
        });
        JBave.addActionListener(new ActionListener() {
   
            @Override
            public void actionPerformed(ActionEvent e) {
   
                try {
   
                    new Average_Score();
                } catch (IOException e1) {
   
                    // TODO Auto-generated catch block
                    e1.printStackTrace();
                }
            }
        });
    }


    public Login_Interface() {
   

        this
  • 39
    点赞
  • 71
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 31
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 31
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

ZZDT0917

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值