private void daftarOlehAdminActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_daftarOlehAdminActionPerformed
        // TODO add your handling code here:
        if (namaDaftarBaru.getText().length() != 0 && idDaftarBaru.getText().length() != 0
                && passwordDfatarBaru.getText().length() != 0) {
            if (sinyalemenDaftar == 0) {
                try {
                    Mahasiswa m = new Mahasiswa();
                    m.setNim(idDaftarBaru.getText());
                    m.setNama(namaDaftarBaru.getText());
                    m.setPassword(passwordDfatarBaru.getText());
                    m.setKelas(jComboBox2.getSelectedItem().toString());
                    m.setStatus(tingkatMhs.getSelectedItem().toString());
                    m.setJenisKelamin(jenisKelamin.getSelectedItem().toString());
                    if (m.getNim() != null && m.getPassword() != null) {
                        cm.insert(m);


                    }
                } catch (SQLException ex) {
                    Logger.getLogger(FormInduk.class
                            .getName()).log(Level.SEVERE, null, ex);
                }
            }
            if (sinyalemenDaftar == 1) {
                Dosen d = new Dosen();
                d.setNip(idDaftarBaru.getText());
                d.setNama(namaDaftarBaru.getText());
                d.setPassword(passwordDfatarBaru.getText());
                try {
                    kb.insertKaprodi(d);


                } catch (SQLException ex) {
                    Logger.getLogger(FormInduk.class
                            .getName()).log(Level.SEVERE, null, ex);
                }
            }
            if (sinyalemenDaftar == 2) {
                Dosen d = new Dosen();
                d.setNip(idDaftarBaru.getText());
                d.setNama(namaDaftarBaru.getText());
                d.setPassword(passwordDfatarBaru.getText());
                try {
                    cd.insert(d);


                } catch (SQLException ex) {
                    Logger.getLogger(FormInduk.class
                            .getName()).log(Level.SEVERE, null, ex);
                }
            }
            if (sinyalemenDaftar == 3) {
                Admin d = new Admin();
                d.setNip(idDaftarBaru.getText());
                d.setNama(namaDaftarBaru.getText());
                d.setPassword(passwordDfatarBaru.getText());
                try {
                    ca.insert(d);


                } catch (SQLException ex) {
                    Logger.getLogger(FormInduk.class
                            .getName()).log(Level.SEVERE, null, ex);
                }
            }
        }
        idDaftarBaru.setText("");
        namaDaftarBaru.setText("");
        passwordDfatarBaru.setText("");

    }