private void jButton2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton2MouseClicked

        String usernameadd = DescField51.getText();
        String passwordadd = DescField55.getText();
        String subject1 = (String) jComboBox2.getSelectedItem();
        String subject2 = (String) jComboBox3.getSelectedItem();
        String subject3 = (String) jComboBox4.getSelectedItem();
        String subject4 = (String) jComboBox5.getSelectedItem();
        String subject5 = (String) jComboBox6.getSelectedItem();
        String subject6 = (String) jComboBox7.getSelectedItem();
        String subject7 = (String) jComboBox8.getSelectedItem();
        int delete = 0;

        if (passwordadd.equals(DescField57.getText())) {

            if (passwordadd.length() > 4 && passwordadd.length() < 4) {
                JOptionPane.showMessageDialog(null, "Please enter a four digit pin and try again!", "Timetable Management Program", JOptionPane.INFORMATION_MESSAGE);

            } else {
                Member_details_add.addtoarray(usernameadd, passwordadd, subject1, subject2, subject3, subject4, subject5, subject6, subject7, delete);
                JOptionPane.showMessageDialog(null, "User Added!", "Timetable Management Program", JOptionPane.INFORMATION_MESSAGE);
                this.setVisible(false);
                login_area.open1 = 0;
            }
        } else {
            JOptionPane.showMessageDialog(null, "The two passcodes don't match try again!", "Timetable Management Program", JOptionPane.INFORMATION_MESSAGE);
        }

    }//GEN-LAST:event_jButton2MouseClicked