private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed
        String value = "account";
        boolean status = false;
        if (mode == 2) {
            value = "nym";
        }
        if (jTable6.getSelectedRow() < 0) {
            JOptionPane.showMessageDialog(null, "Please select contact " + value, "Contact Error", JOptionPane.ERROR_MESSAGE);
            return;
        }
        List list = null;
        if (mode == 1) {
            status = AddressBookHelper.removeContactAcct(contactID, jTable6.getSelectedRow());
            list = AddressBookHelper.getContactDetails(contactID, mode).getContactAccts();
        } else if (mode == 2) {
            status = AddressBookHelper.removeContactNym(contactID, jTable6.getSelectedRow());
            list = AddressBookHelper.getContactDetails(contactID, mode).getContactNyms();
        }
        if (status) {
            JOptionPane.showMessageDialog(null, "Contact " + value + " deleted successfull", "Contact Account", JOptionPane.INFORMATION_MESSAGE);
            ((ContactDetailsTableModel) jTable6.getModel()).setValue(list);
            clearDetails(mode);
        } else {
            JOptionPane.showMessageDialog(null, "Cannot delete contact " + value, "Contact Error", JOptionPane.ERROR_MESSAGE);
        }
    }//GEN-LAST:event_jButton4ActionPerformed