private void jButton8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton8ActionPerformed



        try {
            recordKelompok = ck.getAll(mhs.getStatus());
        } catch (SQLException ex) {
            Logger.getLogger(FormInduk.class.getName()).log(Level.SEVERE, null, ex);
        }
        for (Kelompok kel : recordKelompok) {

            if (kel.getDiajukan().equals(nim)) {
                System.out.println("" + kel.getDiajukan() + "  " + nim);
                jButton40.setVisible(false);
                jLabel94.setText("ANDA SUDAH MENDAFTARKAN KELOMPOK");
                break;
            }
        }

        if (mhs.getStatus().equals("II")) {
            try {
                recordProyekII = cp.getAllPTII();
                isiTabelPilihKelompok("II");
                isiTabelPilihProjMhs("II");
            } catch (SQLException ex) {
                Logger.getLogger(FormInduk.class.getName()).log(Level.SEVERE, null, ex);
            }
        } else if (mhs.getStatus().equals("I")) {
            try {
                isiTabelPilihKelompok("I");
                recordProyekI = cp.getAllPTI();
                isiTabelPilihProjMhs("I");
            } catch (SQLException ex) {
                Logger.getLogger(FormInduk.class.getName()).log(Level.SEVERE, null, ex);
            }
        }

        tabPilihKelompok.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
            public void valueChanged(ListSelectionEvent e) {
                row = tabPilihKelompok.getSelectedRow();
                if (row != -1) {
                    kel = recordKelompok.get(row);
                    System.out.println("" + kel.getIdKelompok());
                    ambilKelompok.setSize(300, 300);
                    ambilKelompok.show();
                    JOptionPane.showMessageDialog(mailContent, pesaN);
                }
            }
        });

        pilihProjMhs.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
            public void valueChanged(ListSelectionEvent e) {
                row = pilihProjMhs.getSelectedRow();
                if (row != -1) {
                    if (mhs.getStatus().equals("II")) {
                        pro = recordProyekII.get(row);
                    } else if (mhs.getStatus().equals("I")) {
                        pro = recordProyekI.get(row);
                    }
                    jLabel60.setText("Judul         : " + pro.getJudul());
                    jLabel61.setText("Dosen Pembina : " + pro.getNama());
                    jLabel62.setText("Max. Anggota  : " + pro.getJumlah());
                    jTextArea2.setText(pro.getDeskripsi());
                    pilihPro.setSize(500, 500);
                    if (Integer.parseInt(pro.getJumlah()) <= 0) {
                        JOptionPane.showMessageDialog(mailContent, "Kuota Habis");
                    } else {
                        pilihPro.show();

                    }
                }
            }
        });


        tabelTemanKelompok.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
            public void valueChanged(ListSelectionEvent e) {
                row = tabelTemanKelompok.getSelectedRow();
                if (row != -1) {
                }
            }
        });
        Kelompok p = new Kelompok();
        try {
            p = cm.getDataKelompok(nim);


        } catch (SQLException ex) {
            Logger.getLogger(FormInduk.class
                    .getName()).log(Level.SEVERE, null, ex);
        }
        Dosen d = new Dosen();
        try {
            d = cm.getDataDepe(nim);


        } catch (SQLException ex) {
            Logger.getLogger(FormInduk.class
                    .getName()).log(Level.SEVERE, null, ex);
        }

        namaKelompokMhs.setText(p.getNamaKelompok());
        namaDosenMhs.setText(d.getNama());
        CardLayout cad = (CardLayout) konten.getLayout();
        if (mhs.getIdKelompok() != 0) {

            cad.show(konten, "kelompok");
            try {
                // TODO add your handling code here:
                recordTemanKelompok = cm.getKelompok(mhs.getIdKelompok());


            } catch (SQLException ex) {
                Logger.getLogger(FormInduk.class
                        .getName()).log(Level.SEVERE, null, ex);
            }
            isiTabelTemanKelompok();
        } else {
            cad.show(konten, "pilihkelompok");


        }

    }