public String listar() throws SQLException {

        String tbl = "";
        ResultSet list = null;
        String colorEstado = "";
        String iconoEstado = "";
        String nomFuncion = "";
        try {
            list = Pro.consultarProfesores();
            while (list.next()) {
                tbl += "<tr>";
                tbl += "<td><center>" + list.getString("Identificacion").toString().trim() + "</center></td>";
                tbl += "<td><center>" + list.getString("Nombre").toString().trim() + "</center></td>";
                tbl += "<td><center>" + list.getString("Apellido").toString().trim() + "</center></td>";
                tbl += "<td><center>" + list.getString("Direccion").toString().trim() + "</center></td>";
                tbl += "<td><center>" + list.getString("Telefono").toString().trim() + "</center></td>";
                tbl += "<td><center>" + list.getString("Perfil_profesional").toString().trim() + "</center></td>";
                tbl += " <td><center><button  class='btn btn-primary glyphicon glyphicon-pencil' data-toggle='modal' data-target='#myModal' onclick = 'mapear.profesores(" + '\"' + list.getString("Identificacion").toString().trim() + '\"' + "," + '\"' + list.getString("Nombre").toString().trim() + '\"'
                        + "," + '\"' + list.getString("Apellido").toString().trim() + '\"' + "," + '\"' + list.getString("Direccion").toString().trim() + '\"' + "," + '\"' + list.getString("Telefono").toString().trim() + '\"'
                        + "," + '\"' + list.getString("Perfil_profesional").toString().trim() + '\"' + ")' ></button></center></td>";
                if (list.getString("Estado").toString().trim().equals("Habilitado")) {
                    colorEstado = "success";
                    iconoEstado = "ok-circle";
                    nomFuncion = "Estado_habilitado(" + '"' + list.getString("Identificacion").toString().trim() + '"' + ")";
                } else if (list.getString("Estado").toString().trim().equals("Inhabilitado")) {
                    colorEstado = "danger";
                    iconoEstado = "remove-circle";
                    nomFuncion = "Estado_inhabilitado(" + '"' + list.getString("Identificacion").toString().trim() + '"' + ")";
                }
                tbl += "<td><center><div id='cambio_est'><button  class='btn btn-" + colorEstado + " glyphicon glyphicon-" + iconoEstado + "' onclick ='" + nomFuncion + "'></button></center></div></center></td>";
                tbl += "</tr>";
            }
        } catch (Exception e) {
            tbl = "error" + e.getMessage();
        }
        return tbl;
    }