用NetBeans做教学选课系统的登录界面

这个博客展示了如何使用JavaFX和NetBeans创建一个教学选课系统的登录界面。登录界面包括用户名输入框、密码输入框、角色选择(管理员、教师、学生)以及登录和重置按钮。代码中实现了不同角色登录时的逻辑处理,当用户点击登录按钮,会根据选择的角色调用相应的登录服务进行验证。
摘要由CSDN通过智能技术生成

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.gs.stu.view;

import com.gs.stu.bean.Manager;
import com.gs.stu.bean.Student;
import com.gs.stu.bean.Teacher;
import com.gs.stu.util.LocationUtil;
import com.gs.stu.service.impl.ManagerServiceImpl;
import com.gs.stu.service.impl.StudentServiceImpl;
import com.gs.stu.service.impl.TeacherServiceImpl;
import com.gs.stu.service1.ManagerService;
import com.gs.stu.service1.StudentService;
import com.gs.stu.service1.TeacherService;
import javafx.scene.control.RadioButton;

/**
 *
 * @author HP-Developer
 */
public class LoginJFrame extends javax.swing.JFrame {
ManagerService managerService=new ManagerServiceImpl();
StudentService ss=new  StudentServiceImpl();
    TeacherService ts= new TeacherServiceImpl();
    /**
     * Creates new form LoginJFrame
     */
    public LoginJFrame() {
        initComponents();
    }

    /**
     * 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">                         
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        loginPicPanel1 = new com.gs.stu.view.LoginPicPanel();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        tfusername = new javax.swing.JTextField();
        pfpassword = new javax.swing.JPasswordField();
        btlogin = new javax.swing.JButton();
        btreset = new javax.swing.JButton();
        rbmanager = new javax.swing.JRadioButton();
        rbTeacher = new javax.swing.JRadioButton();
        rbStudent = new javax.swing.JRadioButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setIconImage(getIconImage());

        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/gw/stu/source/user.JPG"))); // NOI18N
        jLabel1.setText("用户名");

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值