package bd.edu.daffodilvarsity.studentdatabase;

import java.awt.Color;
import java.util.ArrayList;
import java.util.Objects;
import javax.swing.JFrame;
import javax.swing.JOptionPane;

public class AddPanel extends javax.swing.JPanel {
    
    public AddPanel() {
        initComponents();
        db = new DatabaseHelper();
        if(!db.checkDBFile()) {
            db.createDB();
        }
        loginVisiblity(true, false);
        panelVisiblity(false, false, false, false);
    }

    /**
     * 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() {

        welcomePanel = new javax.swing.JPanel();
        welcomeText = new javax.swing.JLabel();
        findButton = new javax.swing.JPanel();
        jLabel23 = new javax.swing.JLabel();
        jSeparator1 = new javax.swing.JSeparator();
        viewResultButton = new javax.swing.JPanel();
        jLabel40 = new javax.swing.JLabel();
        jSeparator3 = new javax.swing.JSeparator();
        admitStudentButton = new javax.swing.JPanel();
        jLabel41 = new javax.swing.JLabel();
        jSeparator4 = new javax.swing.JSeparator();
        dropStudentButton = new javax.swing.JPanel();
        jSeparator9 = new javax.swing.JSeparator();
        jLabel43 = new javax.swing.JLabel();
        findStudentField = new javax.swing.JTextField();
        findStudentErrorText = new javax.swing.JLabel();
        addStudentPanel = new javax.swing.JPanel();
        jLabel11 = new javax.swing.JLabel();
        jSeparator21 = new javax.swing.JSeparator();
        jLabel12 = new javax.swing.JLabel();
        nameLabel4 = new javax.swing.JLabel();
        addStudentFullName = new javax.swing.JTextField();
        jSeparator22 = new javax.swing.JSeparator();
        idLabel4 = new javax.swing.JLabel();
        addStudentID = new javax.swing.JTextField();
        jSeparator23 = new javax.swing.JSeparator();
        addFathersNameField = new javax.swing.JTextField();
        jLabel24 = new javax.swing.JLabel();
        jSeparator24 = new javax.swing.JSeparator();
        genderLabel4 = new javax.swing.JLabel();
        jSeparator25 = new javax.swing.JSeparator();
        motherLabel4 = new javax.swing.JLabel();
        addFemaleCheck = new javax.swing.JRadioButton();
        addMaleCheck = new javax.swing.JRadioButton();
        createProfileButtonPanel4 = new javax.swing.JPanel();
        jLabel26 = new javax.swing.JLabel();
        showSelectedCoursesCount = new javax.swing.JLabel();
        addMothersNameField = new javax.swing.JTextField();
        fatherLabel4 = new javax.swing.JLabel();
        mainFromAdmit = new javax.swing.JPanel();
        jLabel38 = new javax.swing.JLabel();
        jSeparator5 = new javax.swing.JSeparator();
        cse101CheckBox = new javax.swing.JCheckBox();
        cse201CheckBox = new javax.swing.JCheckBox();
        cse301CheckBox = new javax.swing.JCheckBox();
        cse102CheckBox = new javax.swing.JCheckBox();
        cse202CheckBox = new javax.swing.JCheckBox();
        cse302CheckBox = new javax.swing.JCheckBox();
        cse103CheckBox = new javax.swing.JCheckBox();
        cse203CheckBox = new javax.swing.JCheckBox();
        cse303CheckBox = new javax.swing.JCheckBox();
        jLabel13 = new javax.swing.JLabel();
        jLabel25 = new javax.swing.JLabel();
        showSelectedLabCoursesCount = new javax.swing.JLabel();
        cse111CheckBox = new javax.swing.JCheckBox();
        cse112CheckBox = new javax.swing.JCheckBox();
        cse211CheckBox = new javax.swing.JCheckBox();
        cse212CheckBox = new javax.swing.JCheckBox();
        cse311CheckBox = new javax.swing.JCheckBox();
        cse312CheckBox = new javax.swing.JCheckBox();
        updateStudentPanel = new javax.swing.JPanel();
        updateSearchStudentPanel = new javax.swing.JPanel();
        findStudentDropField = new javax.swing.JTextField();
        mainFromDrop1 = new javax.swing.JPanel();
        jLabel46 = new javax.swing.JLabel();
        jSeparator13 = new javax.swing.JSeparator();
        dropStudentSearchButton1 = new javax.swing.JPanel();
        dropStudentSearchButtonLabel1 = new javax.swing.JLabel();
        jLabel16 = new javax.swing.JLabel();
        jSeparator2 = new javax.swing.JSeparator();
        updateFindStudentErrorText = new javax.swing.JLabel();
        updateFoundStudentPanel = new javax.swing.JPanel();
        cancelFromUpdate = new javax.swing.JPanel();
        jSeparator15 = new javax.swing.JSeparator();
        cancelFromUpdateLabel = new javax.swing.JLabel();
        backToMainFromUpdateLabel = new javax.swing.JLabel();
        dropStudentSearchButton2 = new javax.swing.JPanel();
        dropStudentSearchButtonLabel2 = new javax.swing.JLabel();
        jLabel17 = new javax.swing.JLabel();
        nameLabel5 = new javax.swing.JLabel();
        nameLabel6 = new javax.swing.JLabel();
        nameLabel7 = new javax.swing.JLabel();
        nameLabel8 = new javax.swing.JLabel();
        nameLabel9 = new javax.swing.JLabel();
        jLabel14 = new javax.swing.JLabel();
        jLabel19 = new javax.swing.JLabel();
        courseBName = new javax.swing.JLabel();
        nameLabel11 = new javax.swing.JLabel();
        jSeparator26 = new javax.swing.JSeparator();
        updateID = new javax.swing.JTextField();
        updateFullName = new javax.swing.JTextField();
        updateMothersName = new javax.swing.JTextField();
        updateFathersName = new javax.swing.JTextField();
        updateGender = new javax.swing.JTextField();
        nameLabel12 = new javax.swing.JLabel();
        courseAName = new javax.swing.JLabel();
        courseDName = new javax.swing.JLabel();
        courseCName = new javax.swing.JLabel();
        courseFName = new javax.swing.JLabel();
        courseEName = new javax.swing.JLabel();
        courseDNameGrade = new javax.swing.JLabel();
        courseANameGrade = new javax.swing.JLabel();
        courseBNameGrade = new javax.swing.JLabel();
        courseCNameGrade = new javax.swing.JLabel();
        courseFNameGrade = new javax.swing.JLabel();
        courseENameGrade = new javax.swing.JLabel();
        jLabel20 = new javax.swing.JLabel();
        jLabel21 = new javax.swing.JLabel();
        courseBGrade = new javax.swing.JTextField();
        courseAGrade = new javax.swing.JTextField();
        courseDGrade = new javax.swing.JTextField();
        courseCGrade = new javax.swing.JTextField();
        courseFGrade = new javax.swing.JTextField();
        courseEGrade = new javax.swing.JTextField();
        updateButton = new javax.swing.JPanel();
        dropStudentSearchButtonLabel3 = new javax.swing.JLabel();
        resultPanel = new javax.swing.JPanel();
        resultSearchPanel = new javax.swing.JPanel();
        jLabel15 = new javax.swing.JLabel();
        resultSearchButton1 = new javax.swing.JPanel();
        jLabel36 = new javax.swing.JLabel();
        mainFromResult1 = new javax.swing.JPanel();
        jLabel42 = new javax.swing.JLabel();
        jSeparator7 = new javax.swing.JSeparator();
        resultSearchField = new javax.swing.JTextField();
        jSeparator10 = new javax.swing.JSeparator();
        resultFindStudentErrorText = new javax.swing.JLabel();
        resultViewPanel = new javax.swing.JPanel();
        backFromResultView = new javax.swing.JPanel();
        backLabelResult = new javax.swing.JLabel();
        backSepResult = new javax.swing.JSeparator();
        backFromMainLabelResult = new javax.swing.JLabel();
        backFromMainSepResult = new javax.swing.JSeparator();
        jLabel22 = new javax.swing.JLabel();
        nameLabel10 = new javax.swing.JLabel();
        nameLabel13 = new javax.swing.JLabel();
        nameLabel14 = new javax.swing.JLabel();
        nameLabel15 = new javax.swing.JLabel();
        nameLabel16 = new javax.swing.JLabel();
        jLabel27 = new javax.swing.JLabel();
        jLabel28 = new javax.swing.JLabel();
        resultCourseBName = new javax.swing.JLabel();
        nameLabel17 = new javax.swing.JLabel();
        jSeparator27 = new javax.swing.JSeparator();
        resultUpdateID = new javax.swing.JTextField();
        resultFullName = new javax.swing.JTextField();
        resultMothersName = new javax.swing.JTextField();
        resultFathersName = new javax.swing.JTextField();
        resultGender = new javax.swing.JTextField();
        nameLabel18 = new javax.swing.JLabel();
        resultCourseAName = new javax.swing.JLabel();
        resultCourseDName = new javax.swing.JLabel();
        resultCourseCName = new javax.swing.JLabel();
        resultCourseFName = new javax.swing.JLabel();
        resultCourseEName = new javax.swing.JLabel();
        resultCourseDNameGrade = new javax.swing.JLabel();
        resultCourseANameGrade = new javax.swing.JLabel();
        resultCourseBNameGrade = new javax.swing.JLabel();
        resultCourseCNameGrade = new javax.swing.JLabel();
        resultCourseFNameGrade = new javax.swing.JLabel();
        resultCourseENameGrade = new javax.swing.JLabel();
        jLabel29 = new javax.swing.JLabel();
        jLabel30 = new javax.swing.JLabel();
        resultCourseBGrade = new javax.swing.JTextField();
        resultCGPA = new javax.swing.JTextField();
        resultCourseDGrade = new javax.swing.JTextField();
        resultCourseCGrade = new javax.swing.JTextField();
        resultCourseFGrade = new javax.swing.JTextField();
        resultCourseEGrade = new javax.swing.JTextField();
        jLabel31 = new javax.swing.JLabel();
        resultCourseAGrade = new javax.swing.JTextField();
        jLabel32 = new javax.swing.JLabel();
        resultRemarks = new javax.swing.JTextField();
        registerPanel = new javax.swing.JPanel();
        welcomeText2 = new javax.swing.JLabel();
        signUpButton = new javax.swing.JPanel();
        jLabel35 = new javax.swing.JLabel();
        jSeparator8 = new javax.swing.JSeparator();
        jSeparator16 = new javax.swing.JSeparator();
        signupUNameField = new javax.swing.JTextField();
        signupPasswordField = new javax.swing.JPasswordField();
        jLabel44 = new javax.swing.JLabel();
        jSeparator28 = new javax.swing.JSeparator();
        jSeparator12 = new javax.swing.JSeparator();
        signupMasterPasswordField = new javax.swing.JPasswordField();
        backFromSignUp = new javax.swing.JPanel();
        backLabelResult1 = new javax.swing.JLabel();
        backSepResult1 = new javax.swing.JSeparator();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        loginPanel = new javax.swing.JPanel();
        welcomeText1 = new javax.swing.JLabel();
        loginButton = new javax.swing.JPanel();
        jLabel34 = new javax.swing.JLabel();
        jSeparator6 = new javax.swing.JSeparator();
        admitStudentButton1 = new javax.swing.JPanel();
        jSeparator11 = new javax.swing.JSeparator();
        jLabel45 = new javax.swing.JLabel();
        jSeparator14 = new javax.swing.JSeparator();
        loginUNameField = new javax.swing.JTextField();
        loginPWField = new javax.swing.JPasswordField();
        jLabel33 = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();

        setBackground(new java.awt.Color(36, 47, 65));
        setForeground(new java.awt.Color(204, 204, 204));
        setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        welcomePanel.setBackground(new java.awt.Color(36, 47, 65));
        welcomePanel.setForeground(new java.awt.Color(204, 204, 204));
        welcomePanel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        welcomeText.setFont(new java.awt.Font("Century Gothic", 1, 24)); // NOI18N
        welcomeText.setForeground(new java.awt.Color(255, 255, 255));
        welcomeText.setText("Welcome to Student Database");
        welcomePanel.add(welcomeText, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 60, 420, 50));

        findButton.setBackground(new java.awt.Color(50, 132, 255));
        findButton.setForeground(new java.awt.Color(255, 255, 255));
        findButton.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                findButtonMouseClicked(evt);
            }
        });
        findButton.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jLabel23.setFont(new java.awt.Font("Century Gothic", 1, 18)); // NOI18N
        jLabel23.setForeground(new java.awt.Color(255, 255, 255));
        jLabel23.setText("FIND");
        findButton.add(jLabel23, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 0, 70, 40));

        welcomePanel.add(findButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(580, 250, 90, 40));

        jSeparator1.setForeground(new java.awt.Color(255, 255, 255));
        jSeparator1.setFont(new java.awt.Font("Dialog", 0, 10)); // NOI18N
        welcomePanel.add(jSeparator1, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 290, 340, 10));

        viewResultButton.setBackground(new java.awt.Color(36, 47, 65));
        viewResultButton.setForeground(new java.awt.Color(255, 255, 255));
        viewResultButton.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                viewResultButtonMouseClicked(evt);
            }
        });
        viewResultButton.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jLabel40.setFont(new java.awt.Font("Century Gothic", 0, 16)); // NOI18N
        jLabel40.setForeground(new java.awt.Color(255, 255, 255));
        jLabel40.setText("RESULT");
        viewResultButton.add(jLabel40, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 10, 70, 30));

        jSeparator3.setForeground(new java.awt.Color(255, 255, 255));
        viewResultButton.add(jSeparator3, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 40, 80, 20));

        welcomePanel.add(viewResultButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(530, 450, 100, 50));

        admitStudentButton.setBackground(new java.awt.Color(36, 47, 65));
        admitStudentButton.setForeground(new java.awt.Color(255, 255, 255));
        admitStudentButton.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                admitStudentButtonMouseClicked(evt);
            }
        });
        admitStudentButton.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jLabel41.setFont(new java.awt.Font("Century Gothic", 0, 16)); // NOI18N
        jLabel41.setForeground(new java.awt.Color(255, 255, 255));
        jLabel41.setText("ADMIT");
        admitStudentButton.add(jLabel41, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 10, 70, 30));

        jSeparator4.setForeground(new java.awt.Color(255, 255, 255));
        admitStudentButton.add(jSeparator4, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 40, 70, 20));

        welcomePanel.add(admitStudentButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(260, 450, 90, 50));

        dropStudentButton.setBackground(new java.awt.Color(36, 47, 65));
        dropStudentButton.setForeground(new java.awt.Color(255, 255, 255));
        dropStudentButton.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                dropStudentButtonMouseClicked(evt);
            }
        });
        dropStudentButton.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jSeparator9.setForeground(new java.awt.Color(255, 255, 255));
        dropStudentButton.add(jSeparator9, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 40, 80, 20));

        jLabel43.setFont(new java.awt.Font("Century Gothic", 0, 16)); // NOI18N
        jLabel43.setForeground(new java.awt.Color(255, 255, 255));
        jLabel43.setText("UPDATE");
        dropStudentButton.add(jLabel43, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 10, 70, 30));

        welcomePanel.add(dropStudentButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(390, 450, 90, 50));

        findStudentField.setBackground(new java.awt.Color(36, 47, 65));
        findStudentField.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
        findStudentField.setForeground(new java.awt.Color(255, 255, 255));
        findStudentField.setText("Enter ID to find");
        findStudentField.setBorder(null);
        findStudentField.setCaretColor(new java.awt.Color(255, 255, 255));
        findStudentField.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                findStudentFieldMouseClicked(evt);
            }
        });
        welcomePanel.add(findStudentField, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 250, 330, 40));

        findStudentErrorText.setBackground(new java.awt.Color(255, 0, 153));
        findStudentErrorText.setFont(new java.awt.Font("Century Gothic", 1, 14)); // NOI18N
        findStudentErrorText.setForeground(new java.awt.Color(255, 0, 51));
        welcomePanel.add(findStudentErrorText, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 310, 430, 40));

        add(welcomePanel, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1, -1));

        addStudentPanel.setBackground(new java.awt.Color(36, 47, 65));
        addStudentPanel.setForeground(new java.awt.Color(204, 204, 204));
        addStudentPanel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jLabel11.setFont(new java.awt.Font("Century Gothic", 1, 18)); // NOI18N
        jLabel11.setForeground(new java.awt.Color(255, 255, 255));
        jLabel11.setText("STUDENT DETAILS");
        addStudentPanel.add(jLabel11, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 30, -1, -1));

        jSeparator21.setForeground(new java.awt.Color(255, 255, 255));
        jSeparator21.setOrientation(javax.swing.SwingConstants.VERTICAL);
        addStudentPanel.add(jSeparator21, new org.netbeans.lib.awtextra.AbsoluteConstraints(440, 80, 20, 390));

        jLabel12.setFont(new java.awt.Font("Century Gothic", 1, 18)); // NOI18N
        jLabel12.setForeground(new java.awt.Color(255, 255, 255));
        jLabel12.setText("SELECT COURSES");
        addStudentPanel.add(jLabel12, new org.netbeans.lib.awtextra.AbsoluteConstraints(490, 30, -1, -1));

        nameLabel4.setFont(new java.awt.Font("Century Gothic", 1, 16)); // NOI18N
        nameLabel4.setForeground(new java.awt.Color(255, 255, 255));
        nameLabel4.setText("FULL NAME");
        addStudentPanel.add(nameLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 80, -1, -1));

        addStudentFullName.setBackground(new java.awt.Color(36, 47, 65));
        addStudentFullName.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
        addStudentFullName.setForeground(new java.awt.Color(204, 204, 204));
        addStudentFullName.setText("Enter name");
        addStudentFullName.setBorder(null);
        addStudentFullName.setCaretColor(new java.awt.Color(255, 255, 255));
        addStudentFullName.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                addStudentFullNameMouseClicked(evt);
            }
        });
        addStudentPanel.add(addStudentFullName, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 100, 200, 40));

        jSeparator22.setForeground(new java.awt.Color(255, 255, 255));
        addStudentPanel.add(jSeparator22, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 140, 200, -1));

        idLabel4.setFont(new java.awt.Font("Century Gothic", 1, 16)); // NOI18N
        idLabel4.setForeground(new java.awt.Color(255, 255, 255));
        idLabel4.setText("ID");
        addStudentPanel.add(idLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 150, -1, -1));

        addStudentID.setBackground(new java.awt.Color(36, 47, 65));
        addStudentID.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
        addStudentID.setForeground(new java.awt.Color(204, 204, 204));
        addStudentID.setText("Enter student ID");
        addStudentID.setBorder(null);
        addStudentID.setCaretColor(new java.awt.Color(255, 255, 255));
        addStudentID.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                addStudentIDMouseClicked(evt);
            }
        });
        addStudentPanel.add(addStudentID, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 170, 200, 40));

        jSeparator23.setForeground(new java.awt.Color(255, 255, 255));
        addStudentPanel.add(jSeparator23, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 210, 200, -1));

        addFathersNameField.setBackground(new java.awt.Color(36, 47, 65));
        addFathersNameField.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
        addFathersNameField.setForeground(new java.awt.Color(204, 204, 204));
        addFathersNameField.setText("Enter name");
        addFathersNameField.setBorder(null);
        addFathersNameField.setCaretColor(new java.awt.Color(255, 255, 255));
        addFathersNameField.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                addFathersNameFieldMouseClicked(evt);
            }
        });
        addStudentPanel.add(addFathersNameField, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 250, 200, 40));

        jLabel24.setFont(new java.awt.Font("Century Gothic", 0, 16)); // NOI18N
        jLabel24.setForeground(new java.awt.Color(255, 255, 255));
        jLabel24.setText("SELECTED COURSES:");
        addStudentPanel.add(jLabel24, new org.netbeans.lib.awtextra.AbsoluteConstraints(490, 190, -1, -1));

        jSeparator24.setForeground(new java.awt.Color(255, 255, 255));
        addStudentPanel.add(jSeparator24, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 290, 200, -1));

        genderLabel4.setFont(new java.awt.Font("Century Gothic", 1, 16)); // NOI18N
        genderLabel4.setForeground(new java.awt.Color(255, 255, 255));
        genderLabel4.setText("GENDER");
        addStudentPanel.add(genderLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 390, -1, -1));

        jSeparator25.setForeground(new java.awt.Color(255, 255, 255));
        addStudentPanel.add(jSeparator25, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 370, 200, -1));

        motherLabel4.setFont(new java.awt.Font("Century Gothic", 1, 16)); // NOI18N
        motherLabel4.setForeground(new java.awt.Color(255, 255, 255));
        motherLabel4.setText("MOTHER'S NAME");
        addStudentPanel.add(motherLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 310, -1, -1));

        addFemaleCheck.setBackground(new java.awt.Color(36, 47, 65));
        addFemaleCheck.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
        addFemaleCheck.setForeground(new java.awt.Color(255, 255, 255));
        addFemaleCheck.setText("FEMALE");
        addStudentPanel.add(addFemaleCheck, new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 420, -1, -1));

        addMaleCheck.setBackground(new java.awt.Color(36, 47, 65));
        addMaleCheck.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
        addMaleCheck.setForeground(new java.awt.Color(255, 255, 255));
        addMaleCheck.setText("MALE");
        addStudentPanel.add(addMaleCheck, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 420, -1, -1));

        createProfileButtonPanel4.setBackground(new java.awt.Color(50, 132, 255));
        createProfileButtonPanel4.setForeground(new java.awt.Color(255, 255, 255));
        createProfileButtonPanel4.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                createProfileButtonPanel4MouseClicked(evt);
            }
        });
        createProfileButtonPanel4.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jLabel26.setFont(new java.awt.Font("Century Gothic", 1, 16)); // NOI18N
        jLabel26.setForeground(new java.awt.Color(255, 255, 255));
        jLabel26.setText("CREATE PROFILE");
        createProfileButtonPanel4.add(jLabel26, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 0, 160, 50));

        addStudentPanel.add(createProfileButtonPanel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(350, 500, 190, 50));

        showSelectedCoursesCount.setFont(new java.awt.Font("Century Gothic", 0, 16)); // NOI18N
        showSelectedCoursesCount.setForeground(new java.awt.Color(255, 0, 102));
        showSelectedCoursesCount.setText("0");
        addStudentPanel.add(showSelectedCoursesCount, new org.netbeans.lib.awtextra.AbsoluteConstraints(670, 180, 60, 40));

        addMothersNameField.setBackground(new java.awt.Color(36, 47, 65));
        addMothersNameField.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
        addMothersNameField.setForeground(new java.awt.Color(204, 204, 204));
        addMothersNameField.setText("Enter name");
        addMothersNameField.setBorder(null);
        addMothersNameField.setCaretColor(new java.awt.Color(255, 255, 255));
        addMothersNameField.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                addMothersNameFieldMouseClicked(evt);
            }
        });
        addStudentPanel.add(addMothersNameField, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 330, 200, 40));

        fatherLabel4.setFont(new java.awt.Font("Century Gothic", 1, 16)); // NOI18N
        fatherLabel4.setForeground(new java.awt.Color(255, 255, 255));
        fatherLabel4.setText("FATHER'S NAME");
        addStudentPanel.add(fatherLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 230, -1, -1));

        mainFromAdmit.setBackground(new java.awt.Color(36, 47, 65));
        mainFromAdmit.setForeground(new java.awt.Color(255, 255, 255));
        mainFromAdmit.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                mainFromAdmitMouseClicked(evt);
            }
        });
        mainFromAdmit.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jLabel38.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel38.setForeground(new java.awt.Color(255, 255, 255));
        jLabel38.setText("BACK TO MAIN MENU");
        mainFromAdmit.add(jLabel38, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 0, 140, 40));
        mainFromAdmit.add(jSeparator5, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 30, 140, 20));

        addStudentPanel.add(mainFromAdmit, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 500, 170, 50));

        cse101CheckBox.setBackground(new java.awt.Color(36, 47, 65));
        cse101CheckBox.setFont(new java.awt.Font("Century Gothic", 1, 12)); // NOI18N
        cse101CheckBox.setForeground(new java.awt.Color(255, 255, 255));
        cse101CheckBox.setText("CSE 101");
        cse101CheckBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cse101CheckBoxActionPerformed(evt);
            }
        });
        addStudentPanel.add(cse101CheckBox, new org.netbeans.lib.awtextra.AbsoluteConstraints(490, 80, 90, 30));

        cse201CheckBox.setBackground(new java.awt.Color(36, 47, 65));
        cse201CheckBox.setFont(new java.awt.Font("Century Gothic", 1, 12)); // NOI18N
        cse201CheckBox.setForeground(new java.awt.Color(255, 255, 255));
        cse201CheckBox.setText("CSE 201");
        cse201CheckBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cse201CheckBoxActionPerformed(evt);
            }
        });
        addStudentPanel.add(cse201CheckBox, new org.netbeans.lib.awtextra.AbsoluteConstraints(490, 110, 90, 30));

        cse301CheckBox.setBackground(new java.awt.Color(36, 47, 65));
        cse301CheckBox.setFont(new java.awt.Font("Century Gothic", 1, 12)); // NOI18N
        cse301CheckBox.setForeground(new java.awt.Color(255, 255, 255));
        cse301CheckBox.setText("CSE 301");
        cse301CheckBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cse301CheckBoxActionPerformed(evt);
            }
        });
        addStudentPanel.add(cse301CheckBox, new org.netbeans.lib.awtextra.AbsoluteConstraints(490, 140, 90, 30));

        cse102CheckBox.setBackground(new java.awt.Color(36, 47, 65));
        cse102CheckBox.setFont(new java.awt.Font("Century Gothic", 1, 12)); // NOI18N
        cse102CheckBox.setForeground(new java.awt.Color(255, 255, 255));
        cse102CheckBox.setText("CSE 102");
        cse102CheckBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cse102CheckBoxActionPerformed(evt);
            }
        });
        addStudentPanel.add(cse102CheckBox, new org.netbeans.lib.awtextra.AbsoluteConstraints(580, 80, 90, 30));

        cse202CheckBox.setBackground(new java.awt.Color(36, 47, 65));
        cse202CheckBox.setFont(new java.awt.Font("Century Gothic", 1, 12)); // NOI18N
        cse202CheckBox.setForeground(new java.awt.Color(255, 255, 255));
        cse202CheckBox.setText("CSE 202");
        cse202CheckBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cse202CheckBoxActionPerformed(evt);
            }
        });
        addStudentPanel.add(cse202CheckBox, new org.netbeans.lib.awtextra.AbsoluteConstraints(580, 110, 90, 30));

        cse302CheckBox.setBackground(new java.awt.Color(36, 47, 65));
        cse302CheckBox.setFont(new java.awt.Font("Century Gothic", 1, 12)); // NOI18N
        cse302CheckBox.setForeground(new java.awt.Color(255, 255, 255));
        cse302CheckBox.setText("CSE 302");
        cse302CheckBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cse302CheckBoxActionPerformed(evt);
            }
        });
        addStudentPanel.add(cse302CheckBox, new org.netbeans.lib.awtextra.AbsoluteConstraints(580, 140, 90, 30));

        cse103CheckBox.setBackground(new java.awt.Color(36, 47, 65));
        cse103CheckBox.setFont(new java.awt.Font("Century Gothic", 1, 12)); // NOI18N
        cse103CheckBox.setForeground(new java.awt.Color(255, 255, 255));
        cse103CheckBox.setText("CSE 103");
        cse103CheckBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cse103CheckBoxActionPerformed(evt);
            }
        });
        addStudentPanel.add(cse103CheckBox, new org.netbeans.lib.awtextra.AbsoluteConstraints(670, 80, 90, 30));

        cse203CheckBox.setBackground(new java.awt.Color(36, 47, 65));
        cse203CheckBox.setFont(new java.awt.Font("Century Gothic", 1, 12)); // NOI18N
        cse203CheckBox.setForeground(new java.awt.Color(255, 255, 255));
        cse203CheckBox.setText("CSE 203");
        cse203CheckBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cse203CheckBoxActionPerformed(evt);
            }
        });
        addStudentPanel.add(cse203CheckBox, new org.netbeans.lib.awtextra.AbsoluteConstraints(670, 110, 90, 30));

        cse303CheckBox.setBackground(new java.awt.Color(36, 47, 65));
        cse303CheckBox.setFont(new java.awt.Font("Century Gothic", 1, 12)); // NOI18N
        cse303CheckBox.setForeground(new java.awt.Color(255, 255, 255));
        cse303CheckBox.setText("CSE 303");
        cse303CheckBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cse303CheckBoxActionPerformed(evt);
            }
        });
        addStudentPanel.add(cse303CheckBox, new org.netbeans.lib.awtextra.AbsoluteConstraints(670, 140, 90, 30));

        jLabel13.setFont(new java.awt.Font("Century Gothic", 1, 18)); // NOI18N
        jLabel13.setForeground(new java.awt.Color(255, 255, 255));
        jLabel13.setText("SELECT LAB COURSES");
        addStudentPanel.add(jLabel13, new org.netbeans.lib.awtextra.AbsoluteConstraints(490, 270, -1, -1));

        jLabel25.setFont(new java.awt.Font("Century Gothic", 0, 16)); // NOI18N
        jLabel25.setForeground(new java.awt.Color(255, 255, 255));
        jLabel25.setText("SELECTED LAB COURSES:");
        addStudentPanel.add(jLabel25, new org.netbeans.lib.awtextra.AbsoluteConstraints(490, 410, -1, -1));

        showSelectedLabCoursesCount.setFont(new java.awt.Font("Century Gothic", 0, 16)); // NOI18N
        showSelectedLabCoursesCount.setForeground(new java.awt.Color(255, 0, 102));
        showSelectedLabCoursesCount.setText("0");
        addStudentPanel.add(showSelectedLabCoursesCount, new org.netbeans.lib.awtextra.AbsoluteConstraints(700, 400, 100, 40));

        cse111CheckBox.setBackground(new java.awt.Color(36, 47, 65));
        cse111CheckBox.setFont(new java.awt.Font("Century Gothic", 1, 12)); // NOI18N
        cse111CheckBox.setForeground(new java.awt.Color(255, 255, 255));
        cse111CheckBox.setText("CSE 111");
        cse111CheckBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cse111CheckBoxActionPerformed(evt);
            }
        });
        addStudentPanel.add(cse111CheckBox, new org.netbeans.lib.awtextra.AbsoluteConstraints(490, 320, 90, 30));

        cse112CheckBox.setBackground(new java.awt.Color(36, 47, 65));
        cse112CheckBox.setFont(new java.awt.Font("Century Gothic", 1, 12)); // NOI18N
        cse112CheckBox.setForeground(new java.awt.Color(255, 255, 255));
        cse112CheckBox.setText("CSE 112");
        cse112CheckBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cse112CheckBoxActionPerformed(evt);
            }
        });
        addStudentPanel.add(cse112CheckBox, new org.netbeans.lib.awtextra.AbsoluteConstraints(490, 350, 90, 30));

        cse211CheckBox.setBackground(new java.awt.Color(36, 47, 65));
        cse211CheckBox.setFont(new java.awt.Font("Century Gothic", 1, 12)); // NOI18N
        cse211CheckBox.setForeground(new java.awt.Color(255, 255, 255));
        cse211CheckBox.setText("CSE 211");
        cse211CheckBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cse211CheckBoxActionPerformed(evt);
            }
        });
        addStudentPanel.add(cse211CheckBox, new org.netbeans.lib.awtextra.AbsoluteConstraints(580, 320, 90, 30));

        cse212CheckBox.setBackground(new java.awt.Color(36, 47, 65));
        cse212CheckBox.setFont(new java.awt.Font("Century Gothic", 1, 12)); // NOI18N
        cse212CheckBox.setForeground(new java.awt.Color(255, 255, 255));
        cse212CheckBox.setText("CSE 212");
        cse212CheckBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cse212CheckBoxActionPerformed(evt);
            }
        });
        addStudentPanel.add(cse212CheckBox, new org.netbeans.lib.awtextra.AbsoluteConstraints(580, 350, 90, 30));

        cse311CheckBox.setBackground(new java.awt.Color(36, 47, 65));
        cse311CheckBox.setFont(new java.awt.Font("Century Gothic", 1, 12)); // NOI18N
        cse311CheckBox.setForeground(new java.awt.Color(255, 255, 255));
        cse311CheckBox.setText("CSE 311");
        cse311CheckBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cse311CheckBoxActionPerformed(evt);
            }
        });
        addStudentPanel.add(cse311CheckBox, new org.netbeans.lib.awtextra.AbsoluteConstraints(670, 320, 90, 30));

        cse312CheckBox.setBackground(new java.awt.Color(36, 47, 65));
        cse312CheckBox.setFont(new java.awt.Font("Century Gothic", 1, 12)); // NOI18N
        cse312CheckBox.setForeground(new java.awt.Color(255, 255, 255));
        cse312CheckBox.setText("CSE 312");
        cse312CheckBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cse312CheckBoxActionPerformed(evt);
            }
        });
        addStudentPanel.add(cse312CheckBox, new org.netbeans.lib.awtextra.AbsoluteConstraints(670, 350, 90, 30));

        add(addStudentPanel, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1, -1));

        updateStudentPanel.setBackground(new java.awt.Color(36, 47, 65));
        updateStudentPanel.setForeground(new java.awt.Color(204, 204, 204));
        updateStudentPanel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        updateSearchStudentPanel.setBackground(new java.awt.Color(36, 47, 65));
        updateSearchStudentPanel.setForeground(new java.awt.Color(204, 204, 204));
        updateSearchStudentPanel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        findStudentDropField.setBackground(new java.awt.Color(36, 47, 65));
        findStudentDropField.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
        findStudentDropField.setForeground(new java.awt.Color(204, 204, 204));
        findStudentDropField.setText("Enter Student ID");
        findStudentDropField.setBorder(null);
        findStudentDropField.setCaretColor(new java.awt.Color(255, 255, 255));
        findStudentDropField.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                findStudentDropFieldMouseClicked(evt);
            }
        });
        updateSearchStudentPanel.add(findStudentDropField, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 250, 330, 40));

        mainFromDrop1.setBackground(new java.awt.Color(36, 47, 65));
        mainFromDrop1.setForeground(new java.awt.Color(255, 255, 255));
        mainFromDrop1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                mainFromDrop1MouseClicked(evt);
            }
        });
        mainFromDrop1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jLabel46.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel46.setForeground(new java.awt.Color(255, 255, 255));
        jLabel46.setText("BACK TO MAIN MENU");
        mainFromDrop1.add(jLabel46, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 0, 150, 50));

        jSeparator13.setForeground(new java.awt.Color(255, 255, 255));
        mainFromDrop1.add(jSeparator13, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 40, 150, 20));

        updateSearchStudentPanel.add(mainFromDrop1, new org.netbeans.lib.awtextra.AbsoluteConstraints(360, 450, 170, 50));

        dropStudentSearchButton1.setBackground(new java.awt.Color(50, 132, 255));
        dropStudentSearchButton1.setForeground(new java.awt.Color(255, 255, 255));
        dropStudentSearchButton1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                dropStudentSearchButton1MouseClicked(evt);
            }
        });
        dropStudentSearchButton1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        dropStudentSearchButtonLabel1.setFont(new java.awt.Font("Century Gothic", 1, 18)); // NOI18N
        dropStudentSearchButtonLabel1.setForeground(new java.awt.Color(255, 255, 255));
        dropStudentSearchButtonLabel1.setText("FIND");
        dropStudentSearchButton1.add(dropStudentSearchButtonLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 0, 70, 40));

        updateSearchStudentPanel.add(dropStudentSearchButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(580, 250, 90, 40));

        jLabel16.setFont(new java.awt.Font("Century Gothic", 1, 24)); // NOI18N
        jLabel16.setForeground(new java.awt.Color(255, 255, 255));
        jLabel16.setText("Update student data");
        updateSearchStudentPanel.add(jLabel16, new org.netbeans.lib.awtextra.AbsoluteConstraints(330, 60, 240, 40));

        jSeparator2.setForeground(new java.awt.Color(255, 255, 255));
        jSeparator2.setFont(new java.awt.Font("Dialog", 0, 10)); // NOI18N
        updateSearchStudentPanel.add(jSeparator2, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 290, 350, 10));

        updateFindStudentErrorText.setBackground(new java.awt.Color(255, 0, 153));
        updateFindStudentErrorText.setFont(new java.awt.Font("Century Gothic", 1, 14)); // NOI18N
        updateFindStudentErrorText.setForeground(new java.awt.Color(255, 0, 51));
        updateSearchStudentPanel.add(updateFindStudentErrorText, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 310, 450, 40));

        updateStudentPanel.add(updateSearchStudentPanel, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1, -1));

        updateFoundStudentPanel.setBackground(new java.awt.Color(36, 47, 65));
        updateFoundStudentPanel.setForeground(new java.awt.Color(204, 204, 204));
        updateFoundStudentPanel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        cancelFromUpdate.setBackground(new java.awt.Color(36, 47, 65));
        cancelFromUpdate.setForeground(new java.awt.Color(255, 255, 255));
        cancelFromUpdate.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                cancelFromUpdateMouseClicked(evt);
            }
        });
        cancelFromUpdate.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jSeparator15.setForeground(new java.awt.Color(255, 255, 255));
        cancelFromUpdate.add(jSeparator15, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 40, 70, 20));

        cancelFromUpdateLabel.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        cancelFromUpdateLabel.setForeground(new java.awt.Color(255, 255, 255));
        cancelFromUpdateLabel.setText("CANCEL");
        cancelFromUpdate.add(cancelFromUpdateLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 0, 50, 50));

        backToMainFromUpdateLabel.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        backToMainFromUpdateLabel.setForeground(new java.awt.Color(255, 255, 255));
        backToMainFromUpdateLabel.setText("BACK");
        cancelFromUpdate.add(backToMainFromUpdateLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 0, 50, 50));

        updateFoundStudentPanel.add(cancelFromUpdate, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 500, 90, 50));

        dropStudentSearchButton2.setBackground(new java.awt.Color(255, 0, 51));
        dropStudentSearchButton2.setForeground(new java.awt.Color(255, 255, 255));
        dropStudentSearchButton2.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                dropStudentSearchButton2MouseClicked(evt);
            }
        });
        dropStudentSearchButton2.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        dropStudentSearchButtonLabel2.setFont(new java.awt.Font("Century Gothic", 1, 18)); // NOI18N
        dropStudentSearchButtonLabel2.setForeground(new java.awt.Color(255, 255, 255));
        dropStudentSearchButtonLabel2.setText("DROP");
        dropStudentSearchButton2.add(dropStudentSearchButtonLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 0, 80, 40));

        updateFoundStudentPanel.add(dropStudentSearchButton2, new org.netbeans.lib.awtextra.AbsoluteConstraints(630, 500, 110, 40));

        jLabel17.setFont(new java.awt.Font("Century Gothic", 1, 24)); // NOI18N
        jLabel17.setForeground(new java.awt.Color(255, 255, 255));
        jLabel17.setText("UPDATE STUDENT DATA");
        updateFoundStudentPanel.add(jLabel17, new org.netbeans.lib.awtextra.AbsoluteConstraints(310, 20, 310, 40));

        nameLabel5.setFont(new java.awt.Font("Century Gothic", 1, 14)); // NOI18N
        nameLabel5.setForeground(new java.awt.Color(255, 255, 255));
        nameLabel5.setText("GENDER");
        updateFoundStudentPanel.add(nameLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 290, 120, 30));

        nameLabel6.setFont(new java.awt.Font("Century Gothic", 1, 14)); // NOI18N
        nameLabel6.setForeground(new java.awt.Color(255, 255, 255));
        nameLabel6.setText("NAME");
        updateFoundStudentPanel.add(nameLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 130, 50, 30));

        nameLabel7.setFont(new java.awt.Font("Century Gothic", 1, 14)); // NOI18N
        nameLabel7.setForeground(new java.awt.Color(255, 255, 255));
        nameLabel7.setText("ID");
        updateFoundStudentPanel.add(nameLabel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 170, 110, 30));

        nameLabel8.setFont(new java.awt.Font("Century Gothic", 1, 14)); // NOI18N
        nameLabel8.setForeground(new java.awt.Color(255, 255, 255));
        nameLabel8.setText("FATHER'S NAME");
        updateFoundStudentPanel.add(nameLabel8, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 210, 110, 30));

        nameLabel9.setFont(new java.awt.Font("Century Gothic", 1, 14)); // NOI18N
        nameLabel9.setForeground(new java.awt.Color(255, 255, 255));
        nameLabel9.setText("MOTHER'S NAME");
        updateFoundStudentPanel.add(nameLabel9, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 250, 120, 30));

        jLabel14.setFont(new java.awt.Font("Century Gothic", 1, 18)); // NOI18N
        jLabel14.setForeground(new java.awt.Color(255, 255, 255));
        jLabel14.setText("GRADE");
        updateFoundStudentPanel.add(jLabel14, new org.netbeans.lib.awtextra.AbsoluteConstraints(610, 80, 80, -1));

        jLabel19.setFont(new java.awt.Font("Century Gothic", 1, 18)); // NOI18N
        jLabel19.setForeground(new java.awt.Color(255, 255, 255));
        jLabel19.setText("SELECTED COURSES");
        updateFoundStudentPanel.add(jLabel19, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 350, 170, -1));

        courseBName.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
        courseBName.setForeground(new java.awt.Color(0, 255, 204));
        courseBName.setText("CSE XXX");
        updateFoundStudentPanel.add(courseBName, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 390, 70, 30));

        nameLabel11.setFont(new java.awt.Font("Century Gothic", 1, 14)); // NOI18N
        nameLabel11.setForeground(new java.awt.Color(255, 255, 255));
        nameLabel11.setText("LAB");
        updateFoundStudentPanel.add(nameLabel11, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 430, 60, 30));

        jSeparator26.setForeground(new java.awt.Color(255, 255, 255));
        jSeparator26.setOrientation(javax.swing.SwingConstants.VERTICAL);
        updateFoundStudentPanel.add(jSeparator26, new org.netbeans.lib.awtextra.AbsoluteConstraints(440, 80, 20, 390));

        updateID.setEditable(false);
        updateID.setBackground(new java.awt.Color(36, 47, 65));
        updateID.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
        updateID.setForeground(new java.awt.Color(0, 204, 255));
        updateID.setText("DUMMY TEXT");
        updateID.setBorder(null);
        updateID.setCaretColor(new java.awt.Color(255, 255, 255));
        updateFoundStudentPanel.add(updateID, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 170, 240, 30));

        updateFullName.setBackground(new java.awt.Color(36, 47, 65));
        updateFullName.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
        updateFullName.setForeground(new java.awt.Color(0, 204, 255));
        updateFullName.setText("DUMMY TEXT");
        updateFullName.setBorder(null);
        updateFullName.setCaretColor(new java.awt.Color(255, 255, 255));
        updateFoundStudentPanel.add(updateFullName, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 130, 240, 30));

        updateMothersName.setBackground(new java.awt.Color(36, 47, 65));
        updateMothersName.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
        updateMothersName.setForeground(new java.awt.Color(0, 204, 255));
        updateMothersName.setText("DUMMY TEXT");
        updateMothersName.setBorder(null);
        updateMothersName.setCaretColor(new java.awt.Color(255, 255, 255));
        updateFoundStudentPanel.add(updateMothersName, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 250, 240, 30));

        updateFathersName.setBackground(new java.awt.Color(36, 47, 65));
        updateFathersName.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
        updateFathersName.setForeground(new java.awt.Color(0, 204, 255));
        updateFathersName.setText("DUMMY TEXT");
        updateFathersName.setBorder(null);
        updateFathersName.setCaretColor(new java.awt.Color(255, 255, 255));
        updateFoundStudentPanel.add(updateFathersName, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 210, 240, 30));

        updateGender.setEditable(false);
        updateGender.setBackground(new java.awt.Color(36, 47, 65));
        updateGender.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
        updateGender.setForeground(new java.awt.Color(0, 204, 255));
        updateGender.setText("DUMMY TEXT");
        updateGender.setBorder(null);
        updateGender.setCaretColor(new java.awt.Color(255, 255, 255));
        updateFoundStudentPanel.add(updateGender, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 290, 240, 30));

        nameLabel12.setFont(new java.awt.Font("Century Gothic", 1, 14)); // NOI18N
        nameLabel12.setForeground(new java.awt.Color(255, 255, 255));
        nameLabel12.setText("MAIN");
        updateFoundStudentPanel.add(nameLabel12, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 390, 50, 30));

        courseAName.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
        courseAName.setForeground(new java.awt.Color(0, 255, 204));
        courseAName.setText("CSE XXX");
        updateFoundStudentPanel.add(courseAName, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 390, 70, 30));

        courseDName.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
        courseDName.setForeground(new java.awt.Color(0, 255, 204));
        courseDName.setText("CSE XXX");
        updateFoundStudentPanel.add(courseDName, new org.netbeans.lib.awtextra.AbsoluteConstraints(330, 390, 70, 30));

        courseCName.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
        courseCName.setForeground(new java.awt.Color(0, 255, 204));
        courseCName.setText("CSE XXX");
        updateFoundStudentPanel.add(courseCName, new org.netbeans.lib.awtextra.AbsoluteConstraints(260, 390, 70, 30));

        courseFName.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
        courseFName.setForeground(new java.awt.Color(0, 255, 204));
        courseFName.setText("CSE XXX");
        updateFoundStudentPanel.add(courseFName, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 430, 70, 30));

        courseEName.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
        courseEName.setForeground(new java.awt.Color(0, 255, 204));
        courseEName.setText("CSE XXX");
        updateFoundStudentPanel.add(courseEName, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 430, 70, 30));

        courseDNameGrade.setFont(new java.awt.Font("Century Gothic", 1, 14)); // NOI18N
        courseDNameGrade.setForeground(new java.awt.Color(255, 255, 255));
        courseDNameGrade.setText("CSE XXX");
        updateFoundStudentPanel.add(courseDNameGrade, new org.netbeans.lib.awtextra.AbsoluteConstraints(480, 250, 110, 30));

        courseANameGrade.setFont(new java.awt.Font("Century Gothic", 1, 14)); // NOI18N
        courseANameGrade.setForeground(new java.awt.Color(255, 255, 255));
        courseANameGrade.setText("CSE XXX");
        updateFoundStudentPanel.add(courseANameGrade, new org.netbeans.lib.awtextra.AbsoluteConstraints(480, 130, 110, 30));

        courseBNameGrade.setFont(new java.awt.Font("Century Gothic", 1, 14)); // NOI18N
        courseBNameGrade.setForeground(new java.awt.Color(255, 255, 255));
        courseBNameGrade.setText("CSE XXX");
        updateFoundStudentPanel.add(courseBNameGrade, new org.netbeans.lib.awtextra.AbsoluteConstraints(480, 170, 110, 30));

        courseCNameGrade.setFont(new java.awt.Font("Century Gothic", 1, 14)); // NOI18N
        courseCNameGrade.setForeground(new java.awt.Color(255, 255, 255));
        courseCNameGrade.setText("CSE XXX");
        updateFoundStudentPanel.add(courseCNameGrade, new org.netbeans.lib.awtextra.AbsoluteConstraints(480, 210, 110, 30));

        courseFNameGrade.setFont(new java.awt.Font("Century Gothic", 1, 14)); // NOI18N
        courseFNameGrade.setForeground(new java.awt.Color(255, 255, 255));
        courseFNameGrade.setText("CSE XXX");
        updateFoundStudentPanel.add(courseFNameGrade, new org.netbeans.lib.awtextra.AbsoluteConstraints(480, 330, 110, 30));

        courseENameGrade.setFont(new java.awt.Font("Century Gothic", 1, 14)); // NOI18N
        courseENameGrade.setForeground(new java.awt.Color(255, 255, 255));
        courseENameGrade.setText("CSE XXX");
        updateFoundStudentPanel.add(courseENameGrade, new org.netbeans.lib.awtextra.AbsoluteConstraints(480, 290, 110, 30));

        jLabel20.setFont(new java.awt.Font("Century Gothic", 1, 18)); // NOI18N
        jLabel20.setForeground(new java.awt.Color(255, 255, 255));
        jLabel20.setText("STUDENT BIO");
        updateFoundStudentPanel.add(jLabel20, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 90, 170, -1));

        jLabel21.setFont(new java.awt.Font("Century Gothic", 1, 18)); // NOI18N
        jLabel21.setForeground(new java.awt.Color(255, 255, 255));
        jLabel21.setText("COURSE");
        updateFoundStudentPanel.add(jLabel21, new org.netbeans.lib.awtextra.AbsoluteConstraints(480, 80, 80, -1));

        courseBGrade.setBackground(new java.awt.Color(36, 47, 65));
        courseBGrade.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
        courseBGrade.setForeground(new java.awt.Color(0, 204, 255));
        courseBGrade.setText("DUMMY TEXT");
        courseBGrade.setBorder(null);
        courseBGrade.setCaretColor(new java.awt.Color(255, 255, 255));
        updateFoundStudentPanel.add(courseBGrade, new org.netbeans.lib.awtextra.AbsoluteConstraints(610, 170, 90, 30));

        courseAGrade.setBackground(new java.awt.Color(36, 47, 65));
        courseAGrade.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
        courseAGrade.setForeground(new java.awt.Color(0, 204, 255));
        courseAGrade.setText("DUMMY TEXT");
        courseAGrade.setBorder(null);
        courseAGrade.setCaretColor(new java.awt.Color(255, 255, 255));
        updateFoundStudentPanel.add(courseAGrade, new org.netbeans.lib.awtextra.AbsoluteConstraints(610, 130, 90, 30));

        courseDGrade.setBackground(new java.awt.Color(36, 47, 65));
        courseDGrade.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
        courseDGrade.setForeground(new java.awt.Color(0, 204, 255));
        courseDGrade.setText("DUMMY TEXT");
        courseDGrade.setBorder(null);
        courseDGrade.setCaretColor(new java.awt.Color(255, 255, 255));
        updateFoundStudentPanel.add(courseDGrade, new org.netbeans.lib.awtextra.AbsoluteConstraints(610, 250, 90, 30));

        courseCGrade.setBackground(new java.awt.Color(36, 47, 65));
        courseCGrade.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
        courseCGrade.setForeground(new java.awt.Color(0, 204, 255));
        courseCGrade.setText("DUMMY TEXT");
        courseCGrade.setBorder(null);
        courseCGrade.setCaretColor(new java.awt.Color(255, 255, 255));
        updateFoundStudentPanel.add(courseCGrade, new org.netbeans.lib.awtextra.AbsoluteConstraints(610, 210, 90, 30));

        courseFGrade.setBackground(new java.awt.Color(36, 47, 65));
        courseFGrade.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
        courseFGrade.setForeground(new java.awt.Color(0, 204, 255));
        courseFGrade.setText("DUMMY TEXT");
        courseFGrade.setBorder(null);
        courseFGrade.setCaretColor(new java.awt.Color(255, 255, 255));
        updateFoundStudentPanel.add(courseFGrade, new org.netbeans.lib.awtextra.AbsoluteConstraints(610, 330, 90, 30));

        courseEGrade.setBackground(new java.awt.Color(36, 47, 65));
        courseEGrade.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
        courseEGrade.setForeground(new java.awt.Color(0, 204, 255));
        courseEGrade.setText("DUMMY TEXT");
        courseEGrade.setBorder(null);
        courseEGrade.setCaretColor(new java.awt.Color(255, 255, 255));
        updateFoundStudentPanel.add(courseEGrade, new org.netbeans.lib.awtextra.AbsoluteConstraints(610, 290, 90, 30));

        updateButton.setBackground(new java.awt.Color(50, 132, 255));
        updateButton.setForeground(new java.awt.Color(255, 255, 255));
        updateButton.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                updateButtonMouseClicked(evt);
            }
        });
        updateButton.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        dropStudentSearchButtonLabel3.setFont(new java.awt.Font("Century Gothic", 1, 18)); // NOI18N
        dropStudentSearchButtonLabel3.setForeground(new java.awt.Color(255, 255, 255));
        dropStudentSearchButtonLabel3.setText("UPDATE");
        updateButton.add(dropStudentSearchButtonLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 0, 80, 40));

        updateFoundStudentPanel.add(updateButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(390, 500, 110, 40));

        updateStudentPanel.add(updateFoundStudentPanel, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1, -1));

        add(updateStudentPanel, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1, -1));

        resultPanel.setBackground(new java.awt.Color(36, 47, 65));
        resultPanel.setForeground(new java.awt.Color(204, 204, 204));
        resultPanel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        resultSearchPanel.setBackground(new java.awt.Color(36, 47, 65));
        resultSearchPanel.setForeground(new java.awt.Color(204, 204, 204));
        resultSearchPanel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jLabel15.setFont(new java.awt.Font("Century Gothic", 1, 24)); // NOI18N
        jLabel15.setForeground(new java.awt.Color(255, 255, 255));
        jLabel15.setText("Result");
        resultSearchPanel.add(jLabel15, new org.netbeans.lib.awtextra.AbsoluteConstraints(390, 40, 190, 40));

        resultSearchButton1.setBackground(new java.awt.Color(50, 132, 255));
        resultSearchButton1.setForeground(new java.awt.Color(255, 255, 255));
        resultSearchButton1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                resultSearchButton1MouseClicked(evt);
            }
        });
        resultSearchButton1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jLabel36.setFont(new java.awt.Font("Century Gothic", 1, 18)); // NOI18N
        jLabel36.setForeground(new java.awt.Color(255, 255, 255));
        jLabel36.setText("RESULT");
        resultSearchButton1.add(jLabel36, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 0, 80, 40));

        resultSearchPanel.add(resultSearchButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(580, 250, 100, 40));

        mainFromResult1.setBackground(new java.awt.Color(36, 47, 65));
        mainFromResult1.setForeground(new java.awt.Color(255, 255, 255));
        mainFromResult1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                mainFromResult1MouseClicked(evt);
            }
        });
        mainFromResult1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jLabel42.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel42.setForeground(new java.awt.Color(255, 255, 255));
        jLabel42.setText("BACK TO MAIN MENU");
        mainFromResult1.add(jLabel42, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 0, 150, 50));

        jSeparator7.setForeground(new java.awt.Color(255, 255, 255));
        mainFromResult1.add(jSeparator7, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 40, 150, 20));

        resultSearchPanel.add(mainFromResult1, new org.netbeans.lib.awtextra.AbsoluteConstraints(360, 450, 170, 50));

        resultSearchField.setBackground(new java.awt.Color(36, 47, 65));
        resultSearchField.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
        resultSearchField.setForeground(new java.awt.Color(204, 204, 204));
        resultSearchField.setText("Enter Student ID");
        resultSearchField.setBorder(null);
        resultSearchField.setCaretColor(new java.awt.Color(255, 255, 255));
        resultSearchField.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                resultSearchFieldMouseClicked(evt);
            }
        });
        resultSearchPanel.add(resultSearchField, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 250, 330, 40));

        jSeparator10.setForeground(new java.awt.Color(255, 255, 255));
        resultSearchPanel.add(jSeparator10, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 290, 330, 10));

        resultFindStudentErrorText.setBackground(new java.awt.Color(255, 0, 153));
        resultFindStudentErrorText.setFont(new java.awt.Font("Century Gothic", 1, 14)); // NOI18N
        resultFindStudentErrorText.setForeground(new java.awt.Color(255, 0, 51));
        resultSearchPanel.add(resultFindStudentErrorText, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 310, 450, 40));

        resultPanel.add(resultSearchPanel, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1, -1));

        resultViewPanel.setBackground(new java.awt.Color(36, 47, 65));
        resultViewPanel.setForeground(new java.awt.Color(204, 204, 204));
        resultViewPanel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        backFromResultView.setBackground(new java.awt.Color(36, 47, 65));
        backFromResultView.setForeground(new java.awt.Color(255, 255, 255));
        backFromResultView.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                backFromResultViewMouseClicked(evt);
            }
        });
        backFromResultView.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        backLabelResult.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        backLabelResult.setForeground(new java.awt.Color(255, 255, 255));
        backLabelResult.setText("BACK");
        backFromResultView.add(backLabelResult, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 0, 50, 50));

        backSepResult.setForeground(new java.awt.Color(255, 255, 255));
        backFromResultView.add(backSepResult, new org.netbeans.lib.awtextra.AbsoluteConstraints(70, 40, 50, 20));

        backFromMainLabelResult.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        backFromMainLabelResult.setForeground(new java.awt.Color(255, 255, 255));
        backFromMainLabelResult.setText("BACK TO MAIN MENU");
        backFromResultView.add(backFromMainLabelResult, new org.netbeans.lib.awtextra.AbsoluteConstraints(40, 0, 130, 50));

        backFromMainSepResult.setForeground(new java.awt.Color(255, 255, 255));
        backFromResultView.add(backFromMainSepResult, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 40, 160, 20));

        resultViewPanel.add(backFromResultView, new org.netbeans.lib.awtextra.AbsoluteConstraints(330, 510, 230, 50));

        jLabel22.setFont(new java.awt.Font("Century Gothic", 1, 24)); // NOI18N
        jLabel22.setForeground(new java.awt.Color(255, 255, 255));
        jLabel22.setText("RESULT");
        resultViewPanel.add(jLabel22, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 20, 240, 40));

        nameLabel10.setFont(new java.awt.Font("Century Gothic", 1, 14)); // NOI18N
        nameLabel10.setForeground(new java.awt.Color(255, 255, 255));
        nameLabel10.setText("GENDER");
        resultViewPanel.add(nameLabel10, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 290, 120, 30));

        nameLabel13.setFont(new java.awt.Font("Century Gothic", 1, 14)); // NOI18N
        nameLabel13.setForeground(new java.awt.Color(255, 255, 255));
        nameLabel13.setText("NAME");
        resultViewPanel.add(nameLabel13, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 130, 50, 30));

        nameLabel14.setFont(new java.awt.Font("Century Gothic", 1, 14)); // NOI18N
        nameLabel14.setForeground(new java.awt.Color(255, 255, 255));
        nameLabel14.setText("ID");
        resultViewPanel.add(nameLabel14, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 170, 110, 30));

        nameLabel15.setFont(new java.awt.Font("Century Gothic", 1, 14)); // NOI18N
        nameLabel15.setForeground(new java.awt.Color(255, 255, 255));
        nameLabel15.setText("FATHER'S NAME");
        resultViewPanel.add(nameLabel15, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 210, 110, 30));

        nameLabel16.setFont(new java.awt.Font("Century Gothic", 1, 14)); // NOI18N
        nameLabel16.setForeground(new java.awt.Color(255, 255, 255));
        nameLabel16.setText("MOTHER'S NAME");
        resultViewPanel.add(nameLabel16, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 250, 120, 30));

        jLabel27.setFont(new java.awt.Font("Century Gothic", 1, 18)); // NOI18N
        jLabel27.setForeground(new java.awt.Color(255, 255, 255));
        jLabel27.setText("GRADE");
        resultViewPanel.add(jLabel27, new org.netbeans.lib.awtextra.AbsoluteConstraints(610, 80, 80, -1));

        jLabel28.setFont(new java.awt.Font("Century Gothic", 1, 18)); // NOI18N
        jLabel28.setForeground(new java.awt.Color(255, 255, 255));
        jLabel28.setText("SELECTED COURSES");
        resultViewPanel.add(jLabel28, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 350, 170, -1));

        resultCourseBName.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
        resultCourseBName.setForeground(new java.awt.Color(0, 204, 255));
        resultCourseBName.setText("CSE XXX");
        resultViewPanel.add(resultCourseBName, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 390, 70, 30));

        nameLabel17.setFont(new java.awt.Font("Century Gothic", 1, 14)); // NOI18N
        nameLabel17.setForeground(new java.awt.Color(255, 255, 255));
        nameLabel17.setText("LAB");
        resultViewPanel.add(nameLabel17, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 430, 60, 30));

        jSeparator27.setForeground(new java.awt.Color(255, 255, 255));
        jSeparator27.setOrientation(javax.swing.SwingConstants.VERTICAL);
        resultViewPanel.add(jSeparator27, new org.netbeans.lib.awtextra.AbsoluteConstraints(440, 80, 20, 390));

        resultUpdateID.setEditable(false);
        resultUpdateID.setBackground(new java.awt.Color(36, 47, 65));
        resultUpdateID.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
        resultUpdateID.setForeground(new java.awt.Color(0, 204, 255));
        resultUpdateID.setText("DUMMY TEXT");
        resultUpdateID.setBorder(null);
        resultUpdateID.setCaretColor(new java.awt.Color(255, 255, 255));
        resultViewPanel.add(resultUpdateID, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 170, 240, 30));

        resultFullName.setEditable(false);
        resultFullName.setBackground(new java.awt.Color(36, 47, 65));
        resultFullName.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
        resultFullName.setForeground(new java.awt.Color(0, 204, 255));
        resultFullName.setText("DUMMY TEXT");
        resultFullName.setBorder(null);
        resultFullName.setCaretColor(new java.awt.Color(255, 255, 255));
        resultViewPanel.add(resultFullName, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 130, 240, 30));

        resultMothersName.setEditable(false);
        resultMothersName.setBackground(new java.awt.Color(36, 47, 65));
        resultMothersName.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
        resultMothersName.setForeground(new java.awt.Color(0, 204, 255));
        resultMothersName.setText("DUMMY TEXT");
        resultMothersName.setBorder(null);
        resultMothersName.setCaretColor(new java.awt.Color(255, 255, 255));
        resultViewPanel.add(resultMothersName, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 250, 240, 30));

        resultFathersName.setEditable(false);
        resultFathersName.setBackground(new java.awt.Color(36, 47, 65));
        resultFathersName.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
        resultFathersName.setForeground(new java.awt.Color(0, 204, 255));
        resultFathersName.setText("DUMMY TEXT");
        resultFathersName.setBorder(null);
        resultFathersName.setCaretColor(new java.awt.Color(255, 255, 255));
        resultViewPanel.add(resultFathersName, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 210, 240, 30));

        resultGender.setEditable(false);
        resultGender.setBackground(new java.awt.Color(36, 47, 65));
        resultGender.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
        resultGender.setForeground(new java.awt.Color(0, 204, 255));
        resultGender.setText("DUMMY TEXT");
        resultGender.setBorder(null);
        resultGender.setCaretColor(new java.awt.Color(255, 255, 255));
        resultViewPanel.add(resultGender, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 290, 240, 30));

        nameLabel18.setFont(new java.awt.Font("Century Gothic", 1, 14)); // NOI18N
        nameLabel18.setForeground(new java.awt.Color(255, 255, 255));
        nameLabel18.setText("MAIN");
        resultViewPanel.add(nameLabel18, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 390, 50, 30));

        resultCourseAName.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
        resultCourseAName.setForeground(new java.awt.Color(0, 204, 255));
        resultCourseAName.setText("CSE XXX");
        resultViewPanel.add(resultCourseAName, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 390, 70, 30));

        resultCourseDName.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
        resultCourseDName.setForeground(new java.awt.Color(0, 204, 255));
        resultCourseDName.setText("CSE XXX");
        resultViewPanel.add(resultCourseDName, new org.netbeans.lib.awtextra.AbsoluteConstraints(330, 390, 70, 30));

        resultCourseCName.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
        resultCourseCName.setForeground(new java.awt.Color(0, 204, 255));
        resultCourseCName.setText("CSE XXX");
        resultViewPanel.add(resultCourseCName, new org.netbeans.lib.awtextra.AbsoluteConstraints(260, 390, 70, 30));

        resultCourseFName.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
        resultCourseFName.setForeground(new java.awt.Color(0, 204, 255));
        resultCourseFName.setText("CSE XXX");
        resultViewPanel.add(resultCourseFName, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 430, 70, 30));

        resultCourseEName.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
        resultCourseEName.setForeground(new java.awt.Color(0, 204, 255));
        resultCourseEName.setText("CSE XXX");
        resultViewPanel.add(resultCourseEName, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 430, 70, 30));

        resultCourseDNameGrade.setFont(new java.awt.Font("Century Gothic", 1, 14)); // NOI18N
        resultCourseDNameGrade.setForeground(new java.awt.Color(255, 255, 255));
        resultCourseDNameGrade.setText("CSE XXX");
        resultViewPanel.add(resultCourseDNameGrade, new org.netbeans.lib.awtextra.AbsoluteConstraints(480, 250, 110, 30));

        resultCourseANameGrade.setFont(new java.awt.Font("Century Gothic", 1, 14)); // NOI18N
        resultCourseANameGrade.setForeground(new java.awt.Color(255, 255, 255));
        resultCourseANameGrade.setText("CSE XXX");
        resultViewPanel.add(resultCourseANameGrade, new org.netbeans.lib.awtextra.AbsoluteConstraints(480, 130, 110, 30));

        resultCourseBNameGrade.setFont(new java.awt.Font("Century Gothic", 1, 14)); // NOI18N
        resultCourseBNameGrade.setForeground(new java.awt.Color(255, 255, 255));
        resultCourseBNameGrade.setText("CSE XXX");
        resultViewPanel.add(resultCourseBNameGrade, new org.netbeans.lib.awtextra.AbsoluteConstraints(480, 170, 110, 30));

        resultCourseCNameGrade.setFont(new java.awt.Font("Century Gothic", 1, 14)); // NOI18N
        resultCourseCNameGrade.setForeground(new java.awt.Color(255, 255, 255));
        resultCourseCNameGrade.setText("CSE XXX");
        resultViewPanel.add(resultCourseCNameGrade, new org.netbeans.lib.awtextra.AbsoluteConstraints(480, 210, 110, 30));

        resultCourseFNameGrade.setFont(new java.awt.Font("Century Gothic", 1, 14)); // NOI18N
        resultCourseFNameGrade.setForeground(new java.awt.Color(255, 255, 255));
        resultCourseFNameGrade.setText("CSE XXX");
        resultViewPanel.add(resultCourseFNameGrade, new org.netbeans.lib.awtextra.AbsoluteConstraints(480, 330, 110, 30));

        resultCourseENameGrade.setFont(new java.awt.Font("Century Gothic", 1, 14)); // NOI18N
        resultCourseENameGrade.setForeground(new java.awt.Color(255, 255, 255));
        resultCourseENameGrade.setText("CSE XXX");
        resultViewPanel.add(resultCourseENameGrade, new org.netbeans.lib.awtextra.AbsoluteConstraints(480, 290, 110, 30));

        jLabel29.setFont(new java.awt.Font("Century Gothic", 1, 18)); // NOI18N
        jLabel29.setForeground(new java.awt.Color(255, 255, 255));
        jLabel29.setText("STUDENT BIO");
        resultViewPanel.add(jLabel29, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 90, 170, -1));

        jLabel30.setFont(new java.awt.Font("Century Gothic", 1, 18)); // NOI18N
        jLabel30.setForeground(new java.awt.Color(255, 255, 255));
        jLabel30.setText("CGPA");
        resultViewPanel.add(jLabel30, new org.netbeans.lib.awtextra.AbsoluteConstraints(480, 390, 60, 40));

        resultCourseBGrade.setEditable(false);
        resultCourseBGrade.setBackground(new java.awt.Color(36, 47, 65));
        resultCourseBGrade.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
        resultCourseBGrade.setForeground(new java.awt.Color(0, 204, 255));
        resultCourseBGrade.setText("DUMMY TEXT");
        resultCourseBGrade.setBorder(null);
        resultCourseBGrade.setCaretColor(new java.awt.Color(255, 255, 255));
        resultViewPanel.add(resultCourseBGrade, new org.netbeans.lib.awtextra.AbsoluteConstraints(610, 170, 90, 30));

        resultCGPA.setEditable(false);
        resultCGPA.setBackground(new java.awt.Color(36, 47, 65));
        resultCGPA.setFont(new java.awt.Font("Century Gothic", 0, 18)); // NOI18N
        resultCGPA.setForeground(new java.awt.Color(0, 204, 255));
        resultCGPA.setText("DUMMY TEXT");
        resultCGPA.setBorder(null);
        resultCGPA.setCaretColor(new java.awt.Color(255, 255, 255));
        resultViewPanel.add(resultCGPA, new org.netbeans.lib.awtextra.AbsoluteConstraints(590, 400, 120, -1));

        resultCourseDGrade.setEditable(false);
        resultCourseDGrade.setBackground(new java.awt.Color(36, 47, 65));
        resultCourseDGrade.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
        resultCourseDGrade.setForeground(new java.awt.Color(0, 204, 255));
        resultCourseDGrade.setText("DUMMY TEXT");
        resultCourseDGrade.setBorder(null);
        resultCourseDGrade.setCaretColor(new java.awt.Color(255, 255, 255));
        resultViewPanel.add(resultCourseDGrade, new org.netbeans.lib.awtextra.AbsoluteConstraints(610, 250, 90, 30));

        resultCourseCGrade.setEditable(false);
        resultCourseCGrade.setBackground(new java.awt.Color(36, 47, 65));
        resultCourseCGrade.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
        resultCourseCGrade.setForeground(new java.awt.Color(0, 204, 255));
        resultCourseCGrade.setText("DUMMY TEXT");
        resultCourseCGrade.setBorder(null);
        resultCourseCGrade.setCaretColor(new java.awt.Color(255, 255, 255));
        resultViewPanel.add(resultCourseCGrade, new org.netbeans.lib.awtextra.AbsoluteConstraints(610, 210, 90, 30));

        resultCourseFGrade.setEditable(false);
        resultCourseFGrade.setBackground(new java.awt.Color(36, 47, 65));
        resultCourseFGrade.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
        resultCourseFGrade.setForeground(new java.awt.Color(0, 204, 255));
        resultCourseFGrade.setText("DUMMY TEXT");
        resultCourseFGrade.setBorder(null);
        resultCourseFGrade.setCaretColor(new java.awt.Color(255, 255, 255));
        resultViewPanel.add(resultCourseFGrade, new org.netbeans.lib.awtextra.AbsoluteConstraints(610, 330, 90, 30));

        resultCourseEGrade.setEditable(false);
        resultCourseEGrade.setBackground(new java.awt.Color(36, 47, 65));
        resultCourseEGrade.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
        resultCourseEGrade.setForeground(new java.awt.Color(0, 204, 255));
        resultCourseEGrade.setText("DUMMY TEXT");
        resultCourseEGrade.setBorder(null);
        resultCourseEGrade.setCaretColor(new java.awt.Color(255, 255, 255));
        resultViewPanel.add(resultCourseEGrade, new org.netbeans.lib.awtextra.AbsoluteConstraints(610, 290, 90, 30));

        jLabel31.setFont(new java.awt.Font("Century Gothic", 1, 18)); // NOI18N
        jLabel31.setForeground(new java.awt.Color(255, 255, 255));
        jLabel31.setText("COURSE");
        resultViewPanel.add(jLabel31, new org.netbeans.lib.awtextra.AbsoluteConstraints(480, 80, 80, -1));

        resultCourseAGrade.setEditable(false);
        resultCourseAGrade.setBackground(new java.awt.Color(36, 47, 65));
        resultCourseAGrade.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
        resultCourseAGrade.setForeground(new java.awt.Color(0, 204, 255));
        resultCourseAGrade.setText("DUMMY TEXT");
        resultCourseAGrade.setBorder(null);
        resultCourseAGrade.setCaretColor(new java.awt.Color(255, 255, 255));
        resultViewPanel.add(resultCourseAGrade, new org.netbeans.lib.awtextra.AbsoluteConstraints(610, 130, 90, 30));

        jLabel32.setFont(new java.awt.Font("Century Gothic", 1, 18)); // NOI18N
        jLabel32.setForeground(new java.awt.Color(255, 255, 255));
        jLabel32.setText("REMARKS");
        resultViewPanel.add(jLabel32, new org.netbeans.lib.awtextra.AbsoluteConstraints(480, 420, 80, 40));

        resultRemarks.setEditable(false);
        resultRemarks.setBackground(new java.awt.Color(36, 47, 65));
        resultRemarks.setFont(new java.awt.Font("Century Gothic", 0, 18)); // NOI18N
        resultRemarks.setForeground(new java.awt.Color(0, 204, 255));
        resultRemarks.setText("DUMMY TEXT");
        resultRemarks.setBorder(null);
        resultRemarks.setCaretColor(new java.awt.Color(255, 255, 255));
        resultViewPanel.add(resultRemarks, new org.netbeans.lib.awtextra.AbsoluteConstraints(590, 430, 210, 20));

        resultPanel.add(resultViewPanel, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1, -1));

        add(resultPanel, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1, -1));

        registerPanel.setBackground(new java.awt.Color(36, 47, 65));
        registerPanel.setForeground(new java.awt.Color(204, 204, 204));
        registerPanel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        welcomeText2.setFont(new java.awt.Font("Century Gothic", 1, 24)); // NOI18N
        welcomeText2.setForeground(new java.awt.Color(255, 255, 255));
        welcomeText2.setText("Administrator Signup");
        registerPanel.add(welcomeText2, new org.netbeans.lib.awtextra.AbsoluteConstraints(360, 30, 270, 50));

        signUpButton.setBackground(new java.awt.Color(50, 132, 255));
        signUpButton.setForeground(new java.awt.Color(255, 255, 255));
        signUpButton.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                signUpButtonMouseClicked(evt);
            }
        });
        signUpButton.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jLabel35.setFont(new java.awt.Font("Century Gothic", 1, 18)); // NOI18N
        jLabel35.setForeground(new java.awt.Color(255, 255, 255));
        jLabel35.setText("SIGNUP");
        signUpButton.add(jLabel35, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 0, 80, 40));

        registerPanel.add(signUpButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(380, 470, 110, 40));

        jSeparator8.setForeground(new java.awt.Color(255, 255, 255));
        jSeparator8.setFont(new java.awt.Font("Dialog", 0, 10)); // NOI18N
        registerPanel.add(jSeparator8, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 280, 210, 10));

        jSeparator16.setForeground(new java.awt.Color(255, 255, 255));
        jSeparator16.setFont(new java.awt.Font("Dialog", 0, 10)); // NOI18N
        registerPanel.add(jSeparator16, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 200, 210, 10));

        signupUNameField.setBackground(new java.awt.Color(36, 47, 65));
        signupUNameField.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
        signupUNameField.setForeground(new java.awt.Color(255, 255, 255));
        signupUNameField.setText("USERNAME");
        signupUNameField.setBorder(null);
        signupUNameField.setCaretColor(new java.awt.Color(255, 255, 255));
        signupUNameField.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                signupUNameFieldMouseClicked(evt);
            }
        });
        registerPanel.add(signupUNameField, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 160, 230, 40));

        signupPasswordField.setBackground(new java.awt.Color(36, 47, 65));
        signupPasswordField.setForeground(new java.awt.Color(255, 255, 255));
        signupPasswordField.setText("PASSWORD");
        signupPasswordField.setBorder(null);
        signupPasswordField.setCaretColor(new java.awt.Color(255, 255, 255));
        signupPasswordField.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                signupPasswordFieldMouseClicked(evt);
            }
        });
        signupPasswordField.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                signupPasswordFieldActionPerformed(evt);
            }
        });
        registerPanel.add(signupPasswordField, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 240, 210, 40));

        jLabel44.setFont(new java.awt.Font("Century Gothic", 0, 18)); // NOI18N
        jLabel44.setForeground(new java.awt.Color(255, 255, 255));
        jLabel44.setText("Master Password");
        registerPanel.add(jLabel44, new org.netbeans.lib.awtextra.AbsoluteConstraints(520, 160, 170, 40));

        jSeparator28.setForeground(new java.awt.Color(255, 255, 255));
        jSeparator28.setOrientation(javax.swing.SwingConstants.VERTICAL);
        registerPanel.add(jSeparator28, new org.netbeans.lib.awtextra.AbsoluteConstraints(440, 100, 20, 330));

        jSeparator12.setForeground(new java.awt.Color(255, 255, 255));
        jSeparator12.setFont(new java.awt.Font("Dialog", 0, 10)); // NOI18N
        registerPanel.add(jSeparator12, new org.netbeans.lib.awtextra.AbsoluteConstraints(520, 240, 210, 10));

        signupMasterPasswordField.setBackground(new java.awt.Color(36, 47, 65));
        signupMasterPasswordField.setForeground(new java.awt.Color(255, 255, 255));
        signupMasterPasswordField.setText("PASSWORD");
        signupMasterPasswordField.setBorder(null);
        signupMasterPasswordField.setCaretColor(new java.awt.Color(255, 255, 255));
        signupMasterPasswordField.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                signupMasterPasswordFieldMouseClicked(evt);
            }
        });
        registerPanel.add(signupMasterPasswordField, new org.netbeans.lib.awtextra.AbsoluteConstraints(520, 200, 210, 40));

        backFromSignUp.setBackground(new java.awt.Color(36, 47, 65));
        backFromSignUp.setForeground(new java.awt.Color(255, 255, 255));
        backFromSignUp.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                backFromSignUpMouseClicked(evt);
            }
        });
        backFromSignUp.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        backLabelResult1.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        backLabelResult1.setForeground(new java.awt.Color(255, 255, 255));
        backLabelResult1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        backLabelResult1.setText("BACK");
        backFromSignUp.add(backLabelResult1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 0, 50, 50));

        backSepResult1.setForeground(new java.awt.Color(255, 255, 255));
        backFromSignUp.add(backSepResult1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 40, 50, 20));

        registerPanel.add(backFromSignUp, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 460, 70, 50));

        jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/bd/edu/daffodilvarsity/studentdatabase/ic_supervisor_account_white_24dp.png"))); // NOI18N
        jLabel3.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
        registerPanel.add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(460, 200, 40, 50));

        jLabel4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/bd/edu/daffodilvarsity/studentdatabase/ic_vpn_key_white_24dp.png"))); // NOI18N
        jLabel4.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
        registerPanel.add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 240, 40, 50));

        jLabel5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/bd/edu/daffodilvarsity/studentdatabase/ic_perm_identity_white_24dp.png"))); // NOI18N
        jLabel5.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
        registerPanel.add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 160, 40, 50));

        add(registerPanel, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1, -1));

        loginPanel.setBackground(new java.awt.Color(36, 47, 65));
        loginPanel.setForeground(new java.awt.Color(204, 204, 204));
        loginPanel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        welcomeText1.setFont(new java.awt.Font("Century Gothic", 1, 24)); // NOI18N
        welcomeText1.setForeground(new java.awt.Color(255, 255, 255));
        welcomeText1.setText("Administrator Login");
        loginPanel.add(welcomeText1, new org.netbeans.lib.awtextra.AbsoluteConstraints(330, 40, 230, 50));

        loginButton.setBackground(new java.awt.Color(50, 132, 255));
        loginButton.setForeground(new java.awt.Color(255, 255, 255));
        loginButton.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                loginButtonMouseClicked(evt);
            }
        });
        loginButton.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jLabel34.setFont(new java.awt.Font("Century Gothic", 1, 18)); // NOI18N
        jLabel34.setForeground(new java.awt.Color(255, 255, 255));
        jLabel34.setText("LOGIN");
        loginButton.add(jLabel34, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 0, 60, 40));

        loginPanel.add(loginButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(490, 330, 100, 40));

        jSeparator6.setForeground(new java.awt.Color(255, 255, 255));
        jSeparator6.setFont(new java.awt.Font("Dialog", 0, 10)); // NOI18N
        loginPanel.add(jSeparator6, new org.netbeans.lib.awtextra.AbsoluteConstraints(280, 280, 310, 10));

        admitStudentButton1.setBackground(new java.awt.Color(36, 47, 65));
        admitStudentButton1.setForeground(new java.awt.Color(255, 255, 255));
        admitStudentButton1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                admitStudentButton1MouseClicked(evt);
            }
        });
        admitStudentButton1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jSeparator11.setForeground(new java.awt.Color(255, 255, 255));
        admitStudentButton1.add(jSeparator11, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 30, 80, 20));

        jLabel45.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
        jLabel45.setForeground(new java.awt.Color(255, 255, 255));
        jLabel45.setText("Register here");
        admitStudentButton1.add(jLabel45, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 0, -1, 30));

        loginPanel.add(admitStudentButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(460, 460, 110, 40));

        jSeparator14.setForeground(new java.awt.Color(255, 255, 255));
        jSeparator14.setFont(new java.awt.Font("Dialog", 0, 10)); // NOI18N
        loginPanel.add(jSeparator14, new org.netbeans.lib.awtextra.AbsoluteConstraints(280, 200, 310, 10));

        loginUNameField.setBackground(new java.awt.Color(36, 47, 65));
        loginUNameField.setFont(new java.awt.Font("Century Gothic", 0, 14)); // NOI18N
        loginUNameField.setForeground(new java.awt.Color(255, 255, 255));
        loginUNameField.setText("USERNAME");
        loginUNameField.setBorder(null);
        loginUNameField.setCaretColor(new java.awt.Color(255, 255, 255));
        loginUNameField.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                loginUNameFieldMouseClicked(evt);
            }
        });
        loginPanel.add(loginUNameField, new org.netbeans.lib.awtextra.AbsoluteConstraints(280, 160, 330, 40));

        loginPWField.setBackground(new java.awt.Color(36, 47, 65));
        loginPWField.setForeground(new java.awt.Color(255, 255, 255));
        loginPWField.setText("PASSWORD");
        loginPWField.setBorder(null);
        loginPWField.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                loginPWFieldMouseClicked(evt);
            }
        });
        loginPanel.add(loginPWField, new org.netbeans.lib.awtextra.AbsoluteConstraints(280, 240, 310, 40));

        jLabel33.setFont(new java.awt.Font("Segoe UI Light", 0, 14)); // NOI18N
        jLabel33.setForeground(new java.awt.Color(255, 255, 255));
        jLabel33.setText("Don't have access yet?");
        loginPanel.add(jLabel33, new org.netbeans.lib.awtextra.AbsoluteConstraints(330, 450, 140, 50));

        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/bd/edu/daffodilvarsity/studentdatabase/ic_vpn_key_white_24dp.png"))); // NOI18N
        jLabel1.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
        loginPanel.add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(230, 240, 40, 50));

        jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/bd/edu/daffodilvarsity/studentdatabase/ic_perm_identity_white_24dp.png"))); // NOI18N
        jLabel2.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
        loginPanel.add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(230, 160, 40, 50));

        add(loginPanel, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1, -1));
    }// </editor-fold>//GEN-END:initComponents

    /** Below this line are the IDE Generated methods **/
    
    // <editor-fold defaultstate="collapsed" desc="Generated methods">        
    private void addStudentFullNameMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_addStudentFullNameMouseClicked
        this.addStudentFullName.setText("");
        clearText();
    }//GEN-LAST:event_addStudentFullNameMouseClicked

    private void addStudentIDMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_addStudentIDMouseClicked
        this.addStudentID.setText("171-15-");
        clearText();
    }//GEN-LAST:event_addStudentIDMouseClicked

    private void addFathersNameFieldMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_addFathersNameFieldMouseClicked
        this.addFathersNameField.setText("");
    }//GEN-LAST:event_addFathersNameFieldMouseClicked

    private void addMothersNameFieldMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_addMothersNameFieldMouseClicked
       this.addMothersNameField.setText("");
    }//GEN-LAST:event_addMothersNameFieldMouseClicked

    private void viewResultButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_viewResultButtonMouseClicked
        //TODO implement dynamic views after setting up search fucntion
        if(this.dataLoader.getCurrentStudentIndex() >= 0) {
            this.fromMain = true;
            this.backFromMainLabelResult.setVisible(true);
            this.backFromMainSepResult.setVisible(true);
            this.backLabelResult.setVisible(false);
            this.backSepResult.setVisible(false);
            resultShowDetails();
            displayResultPanel(false, true);
            clearText();
        } else {
            this.fromMain = false;
            this.backFromMainLabelResult.setVisible(false);
            this.backFromMainSepResult.setVisible(false);
            this.backLabelResult.setVisible(true);
            this.backSepResult.setVisible(true);
            displayResultPanel(true, false);
        }
        
    }//GEN-LAST:event_viewResultButtonMouseClicked

    private void admitStudentButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_admitStudentButtonMouseClicked
        panelVisiblity(false, true, false, false);
        clearText();
    }//GEN-LAST:event_admitStudentButtonMouseClicked

    private void mainFromAdmitMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_mainFromAdmitMouseClicked
        panelVisiblity(true, false, false, false);
        clearText(); //DONE
    }//GEN-LAST:event_mainFromAdmitMouseClicked

    private void dropStudentButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_dropStudentButtonMouseClicked
        //Need to implement dynamic views after setting up search fucntion 
        if(this.dataLoader.getCurrentStudentIndex() >= 0) {
            this.fromMain = true;
            this.backToMainFromUpdateLabel.setVisible(true);
            this.cancelFromUpdateLabel.setVisible(false);
            updateStudentShowDetails();
            displayUpdateStudentPanel(false, true);
            clearText();
        } else {
            this.fromMain = false;
            this.backToMainFromUpdateLabel.setVisible(false);
            this.cancelFromUpdateLabel.setVisible(true);
            displayUpdateStudentPanel(true, false);
        }
    }//GEN-LAST:event_dropStudentButtonMouseClicked

    private void findStudentFieldMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_findStudentFieldMouseClicked
        this.findStudentField.setText("171-15-");
        clearText();
    }//GEN-LAST:event_findStudentFieldMouseClicked

    private void findStudentDropFieldMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_findStudentDropFieldMouseClicked
        this.findStudentDropField.setText("171-15-");
        clearText();
    }//GEN-LAST:event_findStudentDropFieldMouseClicked

    private void mainFromDrop1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_mainFromDrop1MouseClicked
        refreshData();
        panelVisiblity(true, false, false, false); //DONE
    }//GEN-LAST:event_mainFromDrop1MouseClicked

    private void cancelFromUpdateMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_cancelFromUpdateMouseClicked
        displayUpdateStudentPanel(true, false);
        this.updateFindStudentErrorText.setText("");
        if(this.fromMain) {
            displayUpdateStudentPanel(false, false);
            panelVisiblity(true, false, false, false);
            refreshData();
            return;
        }
        refreshData();
        displayUpdateStudentPanel(true, false);
    }//GEN-LAST:event_cancelFromUpdateMouseClicked

    private void mainFromResult1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_mainFromResult1MouseClicked
        refreshData();
        panelVisiblity(true, false, false, false); //DONE
    }//GEN-LAST:event_mainFromResult1MouseClicked

    private void resultSearchFieldMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_resultSearchFieldMouseClicked
        this.resultSearchField.setText("171-15-");
    }//GEN-LAST:event_resultSearchFieldMouseClicked

    private void createProfileButtonPanel4MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_createProfileButtonPanel4MouseClicked
        createStudentProfile();
    }//GEN-LAST:event_createProfileButtonPanel4MouseClicked

    private void cse101CheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cse101CheckBoxActionPerformed
        mainCourseCheckBoxAction(this.cse101CheckBox);
    }//GEN-LAST:event_cse101CheckBoxActionPerformed

    private void cse201CheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cse201CheckBoxActionPerformed
        mainCourseCheckBoxAction(this.cse201CheckBox);
    }//GEN-LAST:event_cse201CheckBoxActionPerformed

    private void cse301CheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cse301CheckBoxActionPerformed
        mainCourseCheckBoxAction(this.cse301CheckBox);
    }//GEN-LAST:event_cse301CheckBoxActionPerformed

    private void cse102CheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cse102CheckBoxActionPerformed
        mainCourseCheckBoxAction(this.cse102CheckBox);
    }//GEN-LAST:event_cse102CheckBoxActionPerformed

    private void cse202CheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cse202CheckBoxActionPerformed
        mainCourseCheckBoxAction(this.cse202CheckBox);
    }//GEN-LAST:event_cse202CheckBoxActionPerformed

    private void cse302CheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cse302CheckBoxActionPerformed
        mainCourseCheckBoxAction(this.cse302CheckBox);
    }//GEN-LAST:event_cse302CheckBoxActionPerformed

    private void cse103CheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cse103CheckBoxActionPerformed
        mainCourseCheckBoxAction(this.cse103CheckBox);
    }//GEN-LAST:event_cse103CheckBoxActionPerformed

    private void cse203CheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cse203CheckBoxActionPerformed
        mainCourseCheckBoxAction(this.cse203CheckBox);
    }//GEN-LAST:event_cse203CheckBoxActionPerformed

    private void cse303CheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cse303CheckBoxActionPerformed
        mainCourseCheckBoxAction(this.cse303CheckBox);
    }//GEN-LAST:event_cse303CheckBoxActionPerformed

    //Lab Checkboxes
    private void cse111CheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cse111CheckBoxActionPerformed
        labCourseCheckBoxAction(this.cse111CheckBox);
    }//GEN-LAST:event_cse111CheckBoxActionPerformed

    private void cse112CheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cse112CheckBoxActionPerformed
        labCourseCheckBoxAction(this.cse112CheckBox);
    }//GEN-LAST:event_cse112CheckBoxActionPerformed

    private void cse211CheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cse211CheckBoxActionPerformed
        labCourseCheckBoxAction(this.cse211CheckBox);
    }//GEN-LAST:event_cse211CheckBoxActionPerformed

    private void cse212CheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cse212CheckBoxActionPerformed
        labCourseCheckBoxAction(this.cse212CheckBox);
    }//GEN-LAST:event_cse212CheckBoxActionPerformed

    private void cse311CheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cse311CheckBoxActionPerformed
        labCourseCheckBoxAction(this.cse311CheckBox);
    }//GEN-LAST:event_cse311CheckBoxActionPerformed

    private void cse312CheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cse312CheckBoxActionPerformed
        labCourseCheckBoxAction(this.cse312CheckBox);
    }//GEN-LAST:event_cse312CheckBoxActionPerformed

    private void findButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_findButtonMouseClicked
        if(checkIdNum(this.findStudentField.getText())) {
            int n = searchByID(this.findStudentField.getText());
            if(n != -1) {
                setCurrentStudent(n);
                this.findStudentErrorText.setForeground(Color.GREEN);
                this.findStudentErrorText.setText(this.findStudentField.getText()+" is registered."+" \nPress UPDATE or RESULT for more.");
            } else {
                this.findStudentErrorText.setText(this.findStudentField.getText()+" was not found!");
            }
        } else {
            errorDialogue("Please enter the ID in correct format!\n" +
                               "        Format: 171-15-XXXX", 1);
        }
    }//GEN-LAST:event_findButtonMouseClicked

    private void dropStudentSearchButton1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_dropStudentSearchButton1MouseClicked
        if(checkIdNum(this.findStudentDropField.getText())) {
            int n = searchByID(this.findStudentDropField.getText());
            if(n != -1) {
                setCurrentStudent(n);
                updateStudentShowDetails();
                displayUpdateStudentPanel(false, true);
            } else {
                this.updateFindStudentErrorText.setText(this.findStudentDropField.getText()+" was not found!");
            }
        } else {
            errorDialogue("Please enter the ID in correct format!\n" +
                               "        Format: 171-15-XXXX", 1);
        }
    }//GEN-LAST:event_dropStudentSearchButton1MouseClicked

    private void dropStudentSearchButton2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_dropStudentSearchButton2MouseClicked
        errorDialogueTwoButtonDrop("Are you sure you want to drop this student?");
    }//GEN-LAST:event_dropStudentSearchButton2MouseClicked

    private void backFromResultViewMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_backFromResultViewMouseClicked
        if(this.fromMain) {
            displayResultPanel(false, false);
            panelVisiblity(true, false, false, false);
            refreshData();
            return;
        }
        refreshData();
        displayResultPanel(true, false);
    }//GEN-LAST:event_backFromResultViewMouseClicked

    private void resultSearchButton1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_resultSearchButton1MouseClicked
        if(checkIdNum(this.resultSearchField.getText())) {
            int n = searchByID(this.resultSearchField.getText());
            if(n != -1) {
                setCurrentStudent(n);
                resultShowDetails();
                displayResultPanel(false, true);
            } else {
                this.resultFindStudentErrorText.setText(this.findStudentDropField.getText()+" was not found!");
            }
        } else {
            errorDialogue("Please enter the ID in correct format!\n" +
                               "        Format: 171-15-XXXX", 1);
        }
    }//GEN-LAST:event_resultSearchButton1MouseClicked

    private void updateButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_updateButtonMouseClicked
        if(getUpdateData()) {
            this.dataLoader.getStudents().add(this.dataLoader.getCurrentStudentIndex(), this.dataLoader.getCurrentStudent());
            this.dataLoader.saveStudentData();
            refreshData();
            errorDialogue("Student data was updated!", 4);
        } else {
            errorDialogue("Student data was not updated!\nMake sure you typed the grades correctly.", -1);
        }
    }//GEN-LAST:event_updateButtonMouseClicked

    private void loginButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_loginButtonMouseClicked
        login();
    }//GEN-LAST:event_loginButtonMouseClicked

    private void admitStudentButton1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_admitStudentButton1MouseClicked
        loginVisiblity(false, true);
    }//GEN-LAST:event_admitStudentButton1MouseClicked

    private void loginUNameFieldMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_loginUNameFieldMouseClicked
        this.loginUNameField.setText("");
    }//GEN-LAST:event_loginUNameFieldMouseClicked

    private void signUpButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_signUpButtonMouseClicked
        signup();
    }//GEN-LAST:event_signUpButtonMouseClicked

    private void signupUNameFieldMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_signupUNameFieldMouseClicked
        this.signupUNameField.setText("");
    }//GEN-LAST:event_signupUNameFieldMouseClicked

    private void loginPWFieldMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_loginPWFieldMouseClicked
        this.loginPWField.setText("");
    }//GEN-LAST:event_loginPWFieldMouseClicked

    private void backFromSignUpMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_backFromSignUpMouseClicked
        loginVisiblity(true, false);
    }//GEN-LAST:event_backFromSignUpMouseClicked

    private void signupPasswordFieldMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_signupPasswordFieldMouseClicked
        this.signupPasswordField.setText("");
    }//GEN-LAST:event_signupPasswordFieldMouseClicked

    private void signupMasterPasswordFieldMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_signupMasterPasswordFieldMouseClicked
        this.signupMasterPasswordField.setText("");
    }//GEN-LAST:event_signupMasterPasswordFieldMouseClicked

    private void signupPasswordFieldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_signupPasswordFieldActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_signupPasswordFieldActionPerformed
    // </editor-fold>  
    
    /** Below this line are the IDE generated variables **/
    
    // <editor-fold defaultstate="collapsed" desc="Generated variables">  
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JTextField addFathersNameField;
    private javax.swing.JRadioButton addFemaleCheck;
    private javax.swing.JRadioButton addMaleCheck;
    private javax.swing.JTextField addMothersNameField;
    private javax.swing.JTextField addStudentFullName;
    private javax.swing.JTextField addStudentID;
    private javax.swing.JPanel addStudentPanel;
    private javax.swing.JPanel admitStudentButton;
    private javax.swing.JPanel admitStudentButton1;
    private javax.swing.JLabel backFromMainLabelResult;
    private javax.swing.JSeparator backFromMainSepResult;
    private javax.swing.JPanel backFromResultView;
    private javax.swing.JPanel backFromSignUp;
    private javax.swing.JLabel backLabelResult;
    private javax.swing.JLabel backLabelResult1;
    private javax.swing.JSeparator backSepResult;
    private javax.swing.JSeparator backSepResult1;
    private javax.swing.JLabel backToMainFromUpdateLabel;
    private javax.swing.JPanel cancelFromUpdate;
    private javax.swing.JLabel cancelFromUpdateLabel;
    private javax.swing.JTextField courseAGrade;
    private javax.swing.JLabel courseAName;
    private javax.swing.JLabel courseANameGrade;
    private javax.swing.JTextField courseBGrade;
    private javax.swing.JLabel courseBName;
    private javax.swing.JLabel courseBNameGrade;
    private javax.swing.JTextField courseCGrade;
    private javax.swing.JLabel courseCName;
    private javax.swing.JLabel courseCNameGrade;
    private javax.swing.JTextField courseDGrade;
    private javax.swing.JLabel courseDName;
    private javax.swing.JLabel courseDNameGrade;
    private javax.swing.JTextField courseEGrade;
    private javax.swing.JLabel courseEName;
    private javax.swing.JLabel courseENameGrade;
    private javax.swing.JTextField courseFGrade;
    private javax.swing.JLabel courseFName;
    private javax.swing.JLabel courseFNameGrade;
    private javax.swing.JPanel createProfileButtonPanel4;
    private javax.swing.JCheckBox cse101CheckBox;
    private javax.swing.JCheckBox cse102CheckBox;
    private javax.swing.JCheckBox cse103CheckBox;
    private javax.swing.JCheckBox cse111CheckBox;
    private javax.swing.JCheckBox cse112CheckBox;
    private javax.swing.JCheckBox cse201CheckBox;
    private javax.swing.JCheckBox cse202CheckBox;
    private javax.swing.JCheckBox cse203CheckBox;
    private javax.swing.JCheckBox cse211CheckBox;
    private javax.swing.JCheckBox cse212CheckBox;
    private javax.swing.JCheckBox cse301CheckBox;
    private javax.swing.JCheckBox cse302CheckBox;
    private javax.swing.JCheckBox cse303CheckBox;
    private javax.swing.JCheckBox cse311CheckBox;
    private javax.swing.JCheckBox cse312CheckBox;
    private javax.swing.JPanel dropStudentButton;
    private javax.swing.JPanel dropStudentSearchButton1;
    private javax.swing.JPanel dropStudentSearchButton2;
    private javax.swing.JLabel dropStudentSearchButtonLabel1;
    private javax.swing.JLabel dropStudentSearchButtonLabel2;
    private javax.swing.JLabel dropStudentSearchButtonLabel3;
    private javax.swing.JLabel fatherLabel4;
    private javax.swing.JPanel findButton;
    private javax.swing.JTextField findStudentDropField;
    private javax.swing.JLabel findStudentErrorText;
    private javax.swing.JTextField findStudentField;
    private javax.swing.JLabel genderLabel4;
    private javax.swing.JLabel idLabel4;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel29;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel30;
    private javax.swing.JLabel jLabel31;
    private javax.swing.JLabel jLabel32;
    private javax.swing.JLabel jLabel33;
    private javax.swing.JLabel jLabel34;
    private javax.swing.JLabel jLabel35;
    private javax.swing.JLabel jLabel36;
    private javax.swing.JLabel jLabel38;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel40;
    private javax.swing.JLabel jLabel41;
    private javax.swing.JLabel jLabel42;
    private javax.swing.JLabel jLabel43;
    private javax.swing.JLabel jLabel44;
    private javax.swing.JLabel jLabel45;
    private javax.swing.JLabel jLabel46;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JSeparator jSeparator10;
    private javax.swing.JSeparator jSeparator11;
    private javax.swing.JSeparator jSeparator12;
    private javax.swing.JSeparator jSeparator13;
    private javax.swing.JSeparator jSeparator14;
    private javax.swing.JSeparator jSeparator15;
    private javax.swing.JSeparator jSeparator16;
    private javax.swing.JSeparator jSeparator2;
    private javax.swing.JSeparator jSeparator21;
    private javax.swing.JSeparator jSeparator22;
    private javax.swing.JSeparator jSeparator23;
    private javax.swing.JSeparator jSeparator24;
    private javax.swing.JSeparator jSeparator25;
    private javax.swing.JSeparator jSeparator26;
    private javax.swing.JSeparator jSeparator27;
    private javax.swing.JSeparator jSeparator28;
    private javax.swing.JSeparator jSeparator3;
    private javax.swing.JSeparator jSeparator4;
    private javax.swing.JSeparator jSeparator5;
    private javax.swing.JSeparator jSeparator6;
    private javax.swing.JSeparator jSeparator7;
    private javax.swing.JSeparator jSeparator8;
    private javax.swing.JSeparator jSeparator9;
    private javax.swing.JPanel loginButton;
    private javax.swing.JPasswordField loginPWField;
    private javax.swing.JPanel loginPanel;
    private javax.swing.JTextField loginUNameField;
    private javax.swing.JPanel mainFromAdmit;
    private javax.swing.JPanel mainFromDrop1;
    private javax.swing.JPanel mainFromResult1;
    private javax.swing.JLabel motherLabel4;
    private javax.swing.JLabel nameLabel10;
    private javax.swing.JLabel nameLabel11;
    private javax.swing.JLabel nameLabel12;
    private javax.swing.JLabel nameLabel13;
    private javax.swing.JLabel nameLabel14;
    private javax.swing.JLabel nameLabel15;
    private javax.swing.JLabel nameLabel16;
    private javax.swing.JLabel nameLabel17;
    private javax.swing.JLabel nameLabel18;
    private javax.swing.JLabel nameLabel4;
    private javax.swing.JLabel nameLabel5;
    private javax.swing.JLabel nameLabel6;
    private javax.swing.JLabel nameLabel7;
    private javax.swing.JLabel nameLabel8;
    private javax.swing.JLabel nameLabel9;
    private javax.swing.JPanel registerPanel;
    private javax.swing.JTextField resultCGPA;
    private javax.swing.JTextField resultCourseAGrade;
    private javax.swing.JLabel resultCourseAName;
    private javax.swing.JLabel resultCourseANameGrade;
    private javax.swing.JTextField resultCourseBGrade;
    private javax.swing.JLabel resultCourseBName;
    private javax.swing.JLabel resultCourseBNameGrade;
    private javax.swing.JTextField resultCourseCGrade;
    private javax.swing.JLabel resultCourseCName;
    private javax.swing.JLabel resultCourseCNameGrade;
    private javax.swing.JTextField resultCourseDGrade;
    private javax.swing.JLabel resultCourseDName;
    private javax.swing.JLabel resultCourseDNameGrade;
    private javax.swing.JTextField resultCourseEGrade;
    private javax.swing.JLabel resultCourseEName;
    private javax.swing.JLabel resultCourseENameGrade;
    private javax.swing.JTextField resultCourseFGrade;
    private javax.swing.JLabel resultCourseFName;
    private javax.swing.JLabel resultCourseFNameGrade;
    private javax.swing.JTextField resultFathersName;
    private javax.swing.JLabel resultFindStudentErrorText;
    private javax.swing.JTextField resultFullName;
    private javax.swing.JTextField resultGender;
    private javax.swing.JTextField resultMothersName;
    private javax.swing.JPanel resultPanel;
    private javax.swing.JTextField resultRemarks;
    private javax.swing.JPanel resultSearchButton1;
    private javax.swing.JTextField resultSearchField;
    private javax.swing.JPanel resultSearchPanel;
    private javax.swing.JTextField resultUpdateID;
    private javax.swing.JPanel resultViewPanel;
    private javax.swing.JLabel showSelectedCoursesCount;
    private javax.swing.JLabel showSelectedLabCoursesCount;
    private javax.swing.JPanel signUpButton;
    private javax.swing.JPasswordField signupMasterPasswordField;
    private javax.swing.JPasswordField signupPasswordField;
    private javax.swing.JTextField signupUNameField;
    private javax.swing.JPanel updateButton;
    private javax.swing.JTextField updateFathersName;
    private javax.swing.JLabel updateFindStudentErrorText;
    private javax.swing.JPanel updateFoundStudentPanel;
    private javax.swing.JTextField updateFullName;
    private javax.swing.JTextField updateGender;
    private javax.swing.JTextField updateID;
    private javax.swing.JTextField updateMothersName;
    private javax.swing.JPanel updateSearchStudentPanel;
    private javax.swing.JPanel updateStudentPanel;
    private javax.swing.JPanel viewResultButton;
    private javax.swing.JPanel welcomePanel;
    private javax.swing.JLabel welcomeText;
    private javax.swing.JLabel welcomeText1;
    private javax.swing.JLabel welcomeText2;
    // End of variables declaration//GEN-END:variables
    // </editor-fold>  
    
    /** Custom variables **/
    DatabaseHelper db;
    private DataHandler dataLoader = new DataHandler();
    private Student student = new Student();
    private ArrayList<Course> mainCourses = new ArrayList<>();
    private ArrayList<Course> labCourses = new ArrayList<>();
    private ArrayList<Course> courses;
    private int mainCourseCount = 0;
    private int labCourseCount = 0;
    private boolean fromMain = false;
    
    /** Admit panel methods **/  
    //Creates a empty course arraylist
    private void courseInit() {
        this.courses = new ArrayList<>();
        for(int i=0; i < 6; i++) {
            if(i < 4) {
                this.courses.add(this.mainCourses.get(i));
            } else {
                this.courses.add(this.labCourses.get(i-4));
            }
        }
    }
    
    //GOAL Have to find out a better way to do this without repeating all these codes. DONE (for now)
    private void mainCourseCheckBoxAction(javax.swing.JCheckBox checkBox) {                                               
        if(checkBox.isSelected() && this.mainCourseCount < 4) {
            this.mainCourses.add(new Course(checkBox.getText(), 0.0));
            this.mainCourseCount++;
            this.showSelectedCoursesCount.setForeground(Color.RED);
            if(this.mainCourseCount == 4) {
                this.showSelectedCoursesCount.setForeground(Color.GREEN);
            }
            this.showSelectedCoursesCount.setText(""+this.mainCourseCount);
        } else if(this.mainCourseCount >= 4 && checkBox.isSelected()) {
            checkBox.setSelected(false);
        } else {
            deleteMainCourse(checkBox.getText());
            this.mainCourseCount--;
            this.showSelectedCoursesCount.setForeground(Color.RED);
            this.showSelectedCoursesCount.setText(""+this.mainCourseCount);
        }
    }
    
    private void labCourseCheckBoxAction(javax.swing.JCheckBox checkBox) {                                               
        if(checkBox.isSelected() && this.labCourseCount < 2) {
            this.labCourses.add(new Course(checkBox.getText(), 0.0));
            this.labCourseCount++;
            this.showSelectedLabCoursesCount.setForeground(Color.RED);
            if (this.labCourseCount == 2) {
                this.showSelectedLabCoursesCount.setForeground(Color.GREEN);
            }
            this.showSelectedLabCoursesCount.setText(""+(this.labCourseCount));
        } else if(this.labCourseCount >= 2 && checkBox.isSelected()) {
            checkBox.setSelected(false);
        } else {
            deleteLabCourse(checkBox.getText());
            this.labCourseCount--;
            this.showSelectedLabCoursesCount.setForeground(Color.RED);
            this.showSelectedLabCoursesCount.setText(""+(this.labCourseCount));
        }
    } 
    
    //This fucntion finds the index number of a Course array and deletes it
    private void deleteMainCourse(String courseName) {
        for(int i = 0; i < this.mainCourses.size(); i++) {
            if(this.mainCourses.get(i).getCourseName().equals(courseName)) {
                this.mainCourses.remove(i);
                return;
            }
        }
    }
    private void deleteLabCourse(String courseName) {
        for(int i = 0; i < this.labCourses.size(); i++) {
            if(this.labCourses.get(i).getCourseName().equals(courseName)) {
                this.labCourses.remove(i);
                return;
            }
        }
    }
    
    //Moar data, unverified
    private boolean addStudentInputERRPRN() {
        String fullName = this.addStudentFullName.getText();
        String id = this.addStudentID.getText();
        String fathersName = this.addFathersNameField.getText();
        String mothersName = this.addMothersNameField.getText();
        boolean verifiedFullName = checkFullName(fullName);
        boolean verifiedID = checkIdNum(id);
        boolean verifiedFathersName = checkFatherName(fathersName);
        boolean verifiedMothersName = checkMotherName(mothersName);
        if(this.addMaleCheck.isSelected() || this.addFemaleCheck.isSelected()) {
            if (this.addMaleCheck.isSelected()) {
                String gender = this.addMaleCheck.getText();
                gender = gender.substring(0,1).toUpperCase() + gender.substring(1);
                this.student.setGender(gender);
            }
            if (this.addFemaleCheck.isSelected()) {
                String gender = this.addFemaleCheck.getText();
                gender = gender.substring(0,1).toUpperCase() + gender.substring(1);
                this.student.setGender(gender);
            }
        } else {
            errorDialogue("Enter student's gender!", -1);
        }
        if (!verifiedFullName) {
            errorDialogue("Enter student's full name!", 0);
        }
        if (!verifiedID) {
            errorDialogue("Please enter the ID in correct format!\n" +
                               "        Format: 171-15-XXXX", 1);
        }
        if (!verifiedFathersName) {
            errorDialogue("Enter student's father's name!", 2);
        }
        if (!verifiedMothersName) {
            errorDialogue("Enter student's mother's name!", 3);
        }
        if(verifiedFullName && verifiedID && verifiedFathersName && verifiedMothersName && searchByID(id) < 0) {
            this.student.setIdNum(id);
            this.student.setFullName(fullName);
            this.student.setMotherName(mothersName);
            this.student.setFatherName(fathersName);
            return true;
        } else if(searchByID(id) > -1) {
            errorDialogue("There is aleady a student admitted under this id!", -1); 
            return false;
        }
        return false;
    }
    
    private boolean checkIdNum(String idNum) {
        if(idNum.length() == 11) {
            if(Objects.equals(idNum.substring(0, 1), "1") && Objects.equals(idNum.substring(1, 2), "7")  && Objects.equals(idNum.substring(2, 3), "1") && Objects.equals(idNum.substring(3, 4), "-") && Objects.equals(idNum.substring(4, 5), "1") && Objects.equals(idNum.substring(5, 6), "5") && Objects.equals(idNum.substring(6, 7), "-")) {
                return true;
            }
        }
        return false;
    }
    private boolean checkFullName(String fullName) {
        return !fullName.equals("");
    }
    
    private boolean checkFatherName(String fatherName) {
        return !fatherName.equals("");
    }
        
    private boolean checkMotherName(String motherName) {
        return !motherName.equals("");
    }
    
    private boolean addCourseData() {
        if((this.mainCourseCount+this.labCourseCount) == 6) {
            courseInit();
            this.student.setA(this.courses.get(0));
            this.student.setB(this.courses.get(1));
            this.student.setC(this.courses.get(2));
            this.student.setD(this.courses.get(3));
            this.student.setE(this.courses.get(4));
            this.student.setF(this.courses.get(5));
            return true;
        } else {
            return false;
        }
    }
    
    //Creates profile upon button press
    private void createStudentProfile() {
        if(addStudentInputERRPRN() && addCourseData()) {
            this.dataLoader.addStudent(this.student);
            this.dataLoader.saveStudentData();
            refreshData();
            clearCheckBoxes();
            errorDialogue("Student was admitted!", 5);
        } else {
            errorDialogue("Please check if all the informations were typed correctly.", -1);
        }
    }
    
    /** These methods are for update panel **/
    
    //These methods are for displaying the Drop Student Panel  
    private void displayUpdateStudentPanel(boolean search, boolean found) {
        panelVisiblity(false,false, true, false);
        this.updateSearchStudentPanel.setVisible(search);
        this.updateFoundStudentPanel.setVisible(found);
    }
    
    //Geting updated data if valid
    private boolean getUpdateData() {
        if(isValidGrade(this.courseAGrade.getText()) &&  isValidGrade(this.courseBGrade.getText()) &&  isValidGrade(this.courseCGrade.getText()) &&  isValidGrade(this.courseDGrade.getText()) &&  isValidGrade(this.courseEGrade.getText()) &&  isValidGrade(this.courseFGrade.getText()))
        {
            this.dataLoader.getCurrentStudent().setFullName(this.updateFullName.getText());
            this.dataLoader.getCurrentStudent().setFatherName(this.updateFathersName.getText());
            this.dataLoader.getCurrentStudent().setMotherName(this.updateMothersName.getText());
            this.dataLoader.getCurrentStudent().getA().setGradePoints(Double.parseDouble(this.courseAGrade.getText()));
            this.dataLoader.getCurrentStudent().getB().setGradePoints(Double.parseDouble(this.courseBGrade.getText()));
            this.dataLoader.getCurrentStudent().getC().setGradePoints(Double.parseDouble(this.courseCGrade.getText()));
            this.dataLoader.getCurrentStudent().getD().setGradePoints(Double.parseDouble(this.courseDGrade.getText()));
            this.dataLoader.getCurrentStudent().getE().setGradePoints(Double.parseDouble(this.courseEGrade.getText()));
            this.dataLoader.getCurrentStudent().getF().setGradePoints(Double.parseDouble(this.courseFGrade.getText()));
            return true;
        }
        return false;
    }
    
    //Showing student details on update panel
    private void updateStudentShowDetails() {
        this.updateFullName.setText(this.dataLoader.getCurrentStudent().getFullName().toUpperCase());
        this.updateFathersName.setText(this.dataLoader.getCurrentStudent().getFatherName().toUpperCase());
        this.updateMothersName.setText(this.dataLoader.getCurrentStudent().getMotherName().toUpperCase());
        this.updateID.setText(this.dataLoader.getCurrentStudent().getIdNum());
        this.updateGender.setText(this.dataLoader.getCurrentStudent().getGender().toUpperCase());
        this.courseAName.setText(this.dataLoader.getCurrentStudent().getA().getCourseName().toUpperCase());
        this.courseBName.setText(this.dataLoader.getCurrentStudent().getB().getCourseName().toUpperCase());
        this.courseCName.setText(this.dataLoader.getCurrentStudent().getC().getCourseName().toUpperCase());
        this.courseDName.setText(this.dataLoader.getCurrentStudent().getD().getCourseName().toUpperCase());
        this.courseEName.setText(this.dataLoader.getCurrentStudent().getE().getCourseName().toUpperCase());
        this.courseFName.setText(this.dataLoader.getCurrentStudent().getF().getCourseName().toUpperCase());
        this.courseANameGrade.setText(this.dataLoader.getCurrentStudent().getA().getCourseName().toUpperCase());
        this.courseBNameGrade.setText(this.dataLoader.getCurrentStudent().getB().getCourseName().toUpperCase());
        this.courseCNameGrade.setText(this.dataLoader.getCurrentStudent().getC().getCourseName().toUpperCase());
        this.courseDNameGrade.setText(this.dataLoader.getCurrentStudent().getD().getCourseName().toUpperCase());
        this.courseENameGrade.setText(this.dataLoader.getCurrentStudent().getE().getCourseName().toUpperCase());
        this.courseFNameGrade.setText(this.dataLoader.getCurrentStudent().getF().getCourseName().toUpperCase());
        this.courseAGrade.setText(""+this.dataLoader.getCurrentStudent().getA().getGradePoints());
        this.courseBGrade.setText(""+this.dataLoader.getCurrentStudent().getB().getGradePoints());
        this.courseCGrade.setText(""+this.dataLoader.getCurrentStudent().getC().getGradePoints());
        this.courseDGrade.setText(""+this.dataLoader.getCurrentStudent().getD().getGradePoints());
        this.courseEGrade.setText(""+this.dataLoader.getCurrentStudent().getE().getGradePoints());
        this.courseFGrade.setText(""+this.dataLoader.getCurrentStudent().getF().getGradePoints());
    }
    
    //Grade value checker
    private boolean isDouble(String str) {
        try {
            Double.parseDouble(str);
            return true;
        } catch (NumberFormatException e) {
            return false;
        }
    }
    
    private boolean isValidGrade(String str) {
        boolean isDouble = isDouble(str);
        if(isDouble) {
            double grade = Double.parseDouble(str);
            return grade == 0.0d || grade == 2.0d || grade == 2.25d || grade == 2.5d || grade == 2.75d || grade == 3.0d || grade == 3.25d || grade == 3.5d || grade == 3.75d || grade == 4.0d;
        }
        return false;
    }
    /** These methods are for the Result Panel  **/
    
    private void displayResultPanel(boolean search, boolean view) {
        panelVisiblity(false,false, false, true);
        this.resultSearchPanel.setVisible(search);
        this.resultViewPanel.setVisible(view);
    }
    
    //Showing result on screen
    private void resultShowDetails() {
        this.resultFullName.setText(this.dataLoader.getCurrentStudent().getFullName().toUpperCase());
        this.resultFathersName.setText(this.dataLoader.getCurrentStudent().getFatherName().toUpperCase());
        this.resultMothersName.setText(this.dataLoader.getCurrentStudent().getMotherName().toUpperCase());
        this.resultUpdateID.setText(this.dataLoader.getCurrentStudent().getIdNum());
        this.resultGender.setText(this.dataLoader.getCurrentStudent().getGender().toUpperCase());
        this.resultCourseAName.setText(this.dataLoader.getCurrentStudent().getA().getCourseName().toUpperCase());
        this.resultCourseBName.setText(this.dataLoader.getCurrentStudent().getB().getCourseName().toUpperCase());
        this.resultCourseCName.setText(this.dataLoader.getCurrentStudent().getC().getCourseName().toUpperCase());
        this.resultCourseDName.setText(this.dataLoader.getCurrentStudent().getD().getCourseName().toUpperCase());
        this.resultCourseEName.setText(this.dataLoader.getCurrentStudent().getE().getCourseName().toUpperCase());
        this.resultCourseFName.setText(this.dataLoader.getCurrentStudent().getF().getCourseName().toUpperCase());
        this.resultCourseANameGrade.setText(this.dataLoader.getCurrentStudent().getA().getCourseName().toUpperCase());
        this.resultCourseBNameGrade.setText(this.dataLoader.getCurrentStudent().getB().getCourseName().toUpperCase());
        this.resultCourseCNameGrade.setText(this.dataLoader.getCurrentStudent().getC().getCourseName().toUpperCase());
        this.resultCourseDNameGrade.setText(this.dataLoader.getCurrentStudent().getD().getCourseName().toUpperCase());
        this.resultCourseENameGrade.setText(this.dataLoader.getCurrentStudent().getE().getCourseName().toUpperCase());
        this.resultCourseFNameGrade.setText(this.dataLoader.getCurrentStudent().getF().getCourseName().toUpperCase());
        this.resultCourseAGrade.setText(""+this.dataLoader.getCurrentStudent().getA().getGradePoints());
        this.resultCourseBGrade.setText(""+this.dataLoader.getCurrentStudent().getB().getGradePoints());
        this.resultCourseCGrade.setText(""+this.dataLoader.getCurrentStudent().getC().getGradePoints());
        this.resultCourseDGrade.setText(""+this.dataLoader.getCurrentStudent().getD().getGradePoints());
        this.resultCourseEGrade.setText(""+this.dataLoader.getCurrentStudent().getE().getGradePoints());
        this.resultCourseFGrade.setText(""+this.dataLoader.getCurrentStudent().getF().getGradePoints());
        generateRemarks();
    }
    
    //Generating remarks and cgpa based on marks
    private void generateRemarks() {
        double mainPoints = 0;
        double labPoints = 0;
        mainPoints += this.dataLoader.getCurrentStudent().getA().getGradePoints();
        mainPoints += this.dataLoader.getCurrentStudent().getB().getGradePoints();
        mainPoints += this.dataLoader.getCurrentStudent().getC().getGradePoints();
        mainPoints += this.dataLoader.getCurrentStudent().getD().getGradePoints();
        labPoints += this.dataLoader.getCurrentStudent().getE().getGradePoints();
        labPoints += this.dataLoader.getCurrentStudent().getF().getGradePoints();
        double cgpa = ((mainPoints*3d) + (labPoints*1d)) / 14d;
        System.out.println("cgpa "+cgpa);
        if(cgpa >= 0.0 && cgpa < 2.0) {
            this.resultCGPA.setForeground(Color.red);
            this.resultCGPA.setText(cgpaGen(cgpa));
            this.resultRemarks.setForeground(Color.red);
            this.resultRemarks.setText("FAILED");
        } else if(cgpa >= 2.0 && cgpa < 2.25) {
            this.resultCGPA.setForeground(Color.green);
            this.resultCGPA.setText(cgpaGen(cgpa));
            this.resultRemarks.setForeground(Color.green);
            this.resultRemarks.setText("PASS");
        } else if(cgpa >= 2.25 && cgpa < 2.50) {
            this.resultCGPA.setForeground(Color.green);
            this.resultCGPA.setText(cgpaGen(cgpa));
            this.resultRemarks.setForeground(Color.green);
            this.resultRemarks.setText("BELOW AVERAGE");
        } else if(cgpa >= 2.50 && cgpa < 2.75) {
            this.resultCGPA.setForeground(Color.green);
            this.resultCGPA.setText(cgpaGen(cgpa));
            this.resultRemarks.setForeground(Color.green);
            this.resultRemarks.setText("AVERAGE");
        } else if(cgpa >= 2.75 && cgpa < 3.0) {
            this.resultCGPA.setForeground(Color.green);
            this.resultCGPA.setText(cgpaGen(cgpa));
            this.resultRemarks.setForeground(Color.green);
            this.resultRemarks.setText("ABOVE AVERAGE");
        } else if(cgpa >= 3.0 && cgpa < 3.25) {
            this.resultCGPA.setForeground(Color.green);
            this.resultCGPA.setText(cgpaGen(cgpa));
            this.resultRemarks.setForeground(Color.green);
            this.resultRemarks.setText("SATISFACTORY");
        } else if(cgpa >= 3.25 && cgpa < 3.50) {
            this.resultCGPA.setForeground(Color.green);
            this.resultCGPA.setText(cgpaGen(cgpa));
            this.resultRemarks.setForeground(Color.green);
            this.resultRemarks.setText("GOOD");
        } else if(cgpa >= 3.5 && cgpa < 3.75) {
            this.resultCGPA.setForeground(Color.green);
            this.resultCGPA.setText(cgpaGen(cgpa));
            this.resultRemarks.setForeground(Color.green);
            this.resultRemarks.setText("VERY GOOD");
        } else if(cgpa >= 3.75 && cgpa < 4.0) {
            this.resultCGPA.setForeground(Color.green);
            this.resultCGPA.setText(cgpaGen(cgpa));
            this.resultRemarks.setForeground(Color.green);
            this.resultRemarks.setText("EXCELLENT");
        } else if(cgpa == 4.0) {
            this.resultCGPA.setForeground(Color.CYAN);
            this.resultCGPA.setText(cgpaGen(cgpa));
            this.resultRemarks.setForeground(Color.CYAN);
            this.resultRemarks.setText("OUTSTANDING");
        }
    }
    
    private String cgpaGen(double cgpa) {
        String cgpaSTR = Double.toString(cgpa);
        int lastDigit = 0;
        //Incrementing last decimal if next one is greater than or equal to 5
        if(cgpaSTR.length() >= 4) {
            lastDigit = Integer.parseInt(cgpaSTR.substring(3, 4));
            if(Integer.parseInt(cgpaSTR.substring(4, 5)) >= 5) {
                lastDigit = Integer.parseInt(cgpaSTR.substring(3, 4));
                lastDigit++;
            }
            cgpaSTR =  cgpaSTR.substring(0, 4);
            cgpaSTR = cgpaSTR.substring(0, 3) + Integer.toString(lastDigit);
        } 
        return cgpaSTR;
    }
    
    /** Universal methods **/
    
    //This method shows one panel at a time on screen
    private void panelVisiblity(boolean welcomePanel, boolean addStudentPanel, boolean dropStudentPanel, boolean viewResultPanel){
        this.welcomePanel.setVisible(welcomePanel);
        this.addStudentPanel.setVisible(addStudentPanel);
        this.updateStudentPanel.setVisible(dropStudentPanel);
        this.resultPanel.setVisible(viewResultPanel);
    }
    //This method shows one panel at a time on screen
    private void loginVisiblity(boolean loginPanel, boolean registerPanel){
        this.loginPanel.setVisible(loginPanel);
        this.registerPanel.setVisible(registerPanel);
    }

    //Screen clearing methods
    private void clearText() {
        this.findStudentErrorText.setForeground(Color.RED);
        this.findStudentErrorText.setText("");
    }
    
    //Universal ID search method
    private int searchByID(String id) {
        for(Student eachStudent: this.dataLoader.getStudents()) {
            if(eachStudent.getIdNum().equals(id)) {
                return this.dataLoader.getStudents().indexOf(eachStudent);
            }
        }
        return -1;
    }
    
    //Sets current student for eiditing/updating (if found)
    private void setCurrentStudent(int index) {
        this.dataLoader.setCurrentStudent(this.dataLoader.getStudents().get(index));
        this.dataLoader.setCurrentStudentIndex(index);
    }
    
    //Resetting data on screen
    private void refreshData() {
        this.dataLoader.setCurrentStudent(null);
        this.dataLoader.setCurrentStudentIndex(-1);
        this.student = new Student();
        this.courses = new ArrayList<>(6);
        this.mainCourseCount = 0;
    }
    
    //Shows context based error dialogue
    private void errorDialogue(String messageString, int whichField) {
        Object[] message = {messageString};
        Object[] options = {"OK"};
        int n = JOptionPane.showOptionDialog(new JFrame(),
                message, "Alert!",
                JOptionPane.ERROR_MESSAGE, JOptionPane.ERROR_MESSAGE, null,
                options, options[0]);
        if(JOptionPane.ERROR_MESSAGE == n && whichField == 0){
            this.addStudentFullName.setText("");
        } else if(n == JOptionPane.ERROR_MESSAGE && whichField == 1){
            this.addStudentID.setText("171-15-XXXX");
        } else if(n == JOptionPane.ERROR_MESSAGE && whichField == 2){
            this.addFathersNameField.setText("");
        } else if(n == JOptionPane.ERROR_MESSAGE && whichField == 3){
            this.addMothersNameField.setText("");
        } else if(n == JOptionPane.ERROR_MESSAGE && whichField == 4){
            displayUpdateStudentPanel(true, false);
        } else if(n == JOptionPane.ERROR_MESSAGE && whichField == 5){
            panelVisiblity(true, false, false, false);
        } else if(n == JOptionPane.ERROR_MESSAGE && whichField == 6){
            loginVisiblity(true, false);
        } else {
            //DO NOTHING JUST DISPLAY MESSAGE
        }
    }
    
    private void errorDialogueTwoButtonDrop(String messageString) {
        Object[] message = {messageString};
        Object[] options = {"YES", "NO"};
        int n = JOptionPane.showOptionDialog(new JFrame(),
                message, "Alert!",
                JOptionPane.OK_OPTION, JOptionPane.CANCEL_OPTION, null,
                options, options[1]);
        switch (n) {
            case JOptionPane.OK_OPTION: this.dataLoader.dropStudent(this.dataLoader.getCurrentStudentIndex());
                                        this.dataLoader.saveStudentData();
                                        this.dataLoader.loadStudentData();
                                        refreshData();
                                        panelVisiblity(true, false, false, false);
                                        break;
            case JOptionPane.CANCEL_OPTION: break;
            default: break;
        }
    } 
    
    public void clearCheckBoxes() {
        cse101CheckBox.setSelected(false);
        cse102CheckBox.setSelected(false);
        cse103CheckBox.setSelected(false);
        cse111CheckBox.setSelected(false);
        cse112CheckBox.setSelected(false);
        cse201CheckBox.setSelected(false);
        cse202CheckBox.setSelected(false);
        cse203CheckBox.setSelected(false);
        cse211CheckBox.setSelected(false);
        cse212CheckBox.setSelected(false);
        cse301CheckBox.setSelected(false);
        cse302CheckBox.setSelected(false);
        cse303CheckBox.setSelected(false);
        cse311CheckBox.setSelected(false);
        cse312CheckBox.setSelected(false);
        this.mainCourseCount = 0;
        this.labCourseCount = 0;
        this.showSelectedLabCoursesCount.setForeground(Color.RED);
        this.showSelectedLabCoursesCount.setText(""+(this.labCourseCount));
        this.showSelectedCoursesCount.setForeground(Color.RED);
        this.showSelectedCoursesCount.setText(""+this.mainCourseCount);
    }
    
    public void login() {
        String username = this.loginUNameField.getText();
        char[] passwordChar = this.loginPWField.getPassword();
        String password = new String(passwordChar);
        boolean auth = db.authenticate(username, password);
        if(auth) {
            loginVisiblity(false, false);
            panelVisiblity(true, false, false, false);
        }
        else {
            errorDialogue("Invalid username or password!", -1);
        }
    }
    
    public void signup() {
        String username = this.signupUNameField.getText();
        String password = new String(this.signupPasswordField.getPassword());
        String masterPass = new String(this.signupMasterPasswordField.getPassword());
        if(db.authenticate(masterPass)) {
            int valid = db.addAdmin(username, password);
            if(valid == 1) {
                errorDialogue("Account successfully created!", 6);
            } else if (valid == -1) {
                errorDialogue("Username already exists! Try again.", -1);
            }
        } else {
            errorDialogue("Wrong master password! Try again.", -1);
        }
    }
}