"I was in the hospital wing when they held the trials," said McLaggen, with something of a swagger.
But there was no air of smugness, excitement, or superiority; none of the swagger that he had had on the Hogwarts Express, when he had boasted openly of the mission he had been given by Voldemort…… There could be only one conclusion, in Harry’s opinion: The mission, whatever it was, was going badly.
The run-up to this crucial match had all the usual features: members of rival Houses attempting to intimidate opposing teams in the corridors; unpleasant chants about individual players being rehearsed loudly as they passed; the team members themselves either swaggering around enjoying all the attention or else dashing into bathrooms between classes to throw up.
There are no more uses of "swagger" in the book.
Show samples from other sources
The team swaggered onto the court—full of confidence.
The cowboy swaggered into the saloon with his holster unstrapped.