A judge offered a jilted High Wycombe man some stern relationship advice after sparing him jail for bombarding his ex-girlfriend with hundreds of abusive text messages and threatening to kill her cat.

When Connor Jordan’s partner of just three months broke up with him, he rang and texted her dozens of times a day until he was arrested for throwing a brick through her window.

The 22-year-old labourer, from Loddon Road, has now been given a suspended sentence with Judge Bruce McIntyre offering him some life lessons on how to deal with a broken heart.

Judge McIntyre said: “She broke it off, you were hurt and you started this course of behaviour.

"Sometimes that is going to happen to you and you've got to learn to take it and not react in that sort of way."

Jordan admitted a single charge of stalking on the first day of his trial yesterday (Tuesday), which related to sending abusive messages, showing up at his ex-girlfriend's place of work and throwing a brick through the window of her home.

In text messages – which the court heard became “increasingly” threatening – Jordan told his former girlfriend to "watch who you open the door to on Hallowe'en" and said he would "punch your face into the concrete”, the court heard.

Jonathan Sank, prosecuting, said: "She began a relationship which lasted just three months, maybe less, with the defendant.

"But she ended it because she didn't want to be with him anymore.

"He took this rather badly and he sent her a number of abusive messages including threats to kill."

He would call her dozens of times a day from withheld numbers and also threatened to post so-called "revenge porn" naked photos of her online, the court heard.

The teenager, who was aged 17 during the relationship, was left traumatised by the 293 messages she documented being sent to her in five months from last September, telling detectives “it pushed me beyond scared”.

Victoria Gainza, defending, said Jordan had struggled to deal with the break-up of his relationship in the aftermath of his father's death due to a heart attack and pointed to numerous loving messages he had sent to during the same time period.

"Many of them show a young man who is suffering a loss, who is very upset about the end of a relationship," said Ms Gainza.

"He is clearly finding it very difficult to move on.

"It's clear he dealt with that in a way that was undoubtedly inadequate."

However, she insisted threats had been made on both sides, pointing to rude and abusive messages from Jordan's ex-girlfriend mocking him and speaking about "repercussions”.

But, Mr Sank countered: "One doesn't always, when you are in fear, become a shrinking violet."

Judge McIntyre, passing sentence, said the public would be better served by Jordan undergoing a rehabilitative programme than spending just a short spell behind bars, as he had already served five months on remand.

He said: "This is nasty, bullying sort of behaviour towards this girl.

"Undoubtedly you were hurt, but that's not an excuse for engaging in this sort of behaviour.”

He added: “Sometimes that's going to happen to you and you've got to learn to take it and not react in that sort of way."

Jordan was given a nine month prison sentence, suspended for 21 months, and handed a restraining order banning him from contacting his ex-girlfriend, her family and her friends.

He was ordered to continue a court-ordered programme to manage alcohol-related aggression, and given an additional 60-day rehabilitation order.