He just doesn’t get it.

A seething federal judge blasted Assemblyman William Boyland Jr. Tuesday for sending a creepy text message to a witness who testified against him at his corruption trial in Brooklyn federal court.

“Love ya sis,” Boyland wrote to his estranged former campaign treasurer last Thursday after she told jurors that his shady bookeeping prompted her resignation, prosecutors said Tuesday.

Unaware who sent the bizarre note, Maria DeLongoria immediately alerted FBI agents who tracked the number to Boyland.

“Obviously, our witness was disturbed,” assistant US Attorney Christina Dugger said Tuesday, noting that DeLongoria interpreted the message as a “veiled threat.”

Boyland’s attorneys argued that he simply wanted to let his former pal know there were no hard feelings over her cooperation.

But Judge Sandra Townes was not amused and sternly warned Boyland to keep his distance from witnesses for the duration of the trial.

“You are not to have contact with anyone who has an interest in this trial,” Townes said.

“Do you understand, Mr. Boyland?” she demanded.

“Yes, your honor,” he replied sheepishly as Townes let out an exasperated sigh.

DeLongoria — now a senior administrator at Suffolk County Community College — first met Boyland and his former wife on a beach in Sag Harbor. He eventually asked her to become his treasurer.

But the relationship soured after DeLongoria noticed improper withdrawals on accounts that were registered in her name and abruptly quit her position, she told the court last week.

The Brownsville politician is charged with offering up political favors to undercover agents posing as businessmen in exchange for payoffs. He faces 30 years in prison if convicted.

When the trial got back underway, Boyland was again rocked by testimony from his former lover and chief of staff Ry-Ann Hermon Tuesday.

She told the court that Boyland lied about graduating from Virginia State University despite claims that he received his diploma on his official Web site.

Hermon also dished that Boyland constantly ran out of money and could not even manage mortgage payments on his own home.

Hermon — who was also charged in the bribery scheme before copping a plea and agreeing to testify against Boyland — said she one-day hoped to become a state senator under Boyland’s skillful mentorship.