private void btnEliminarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEliminarActionPerformed
        // TODO add your handling code here:
        if (correo != null) {
            int confirma = JOptionPane.showConfirmDialog(this, "¿Seguro que desea eliminar este correo?", "Confirma", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
            if (confirma == 0) {
                try {
                    if (registraCorreo.eliminarCorreoByID(correo.getId() + "")) {
                        JOptionPane.showMessageDialog(this, "El correo se ha eliminado.", "Correo eliminado.", JOptionPane.INFORMATION_MESSAGE);
                        lblCorreo.setText("");
                        lblOrigen.setText("");
                        lblGrupo.setText("");
                        correo = null;
                    }
                } catch (SQLException ex) {
                    Logger.getLogger(VistaEliminar.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
        }else{
            JOptionPane.showMessageDialog(this, "Busca un correo primero.", "Advertencia", JOptionPane.WARNING_MESSAGE);
        }
    }//GEN-LAST:event_btnEliminarActionPerformed