One politician grumbled in the courtroom, sounded off to the reporters who gathered outside and seemingly nodded off in full view of the jury. The other has followed the courtroom action avidly, his head twisting as if watching a tennis match, and occasionally broken into song in the hallway.

Indeed, while both men face possible prison time and undetermined political damage, the contrast between the two powerful 70-something politicians recently on trial in Manhattan —Donald J. Trump and Robert Menendez — extends far beyond their political affiliations. Each has adopted very different demeanors while sitting at the defense table.

Mr. Menendez, 70, the veteran Democratic senator from New Jersey facing federal corruption charges, has been an attentive participant, pivoting his gaze between the witnesses testifying against him and his defense team fighting back. He makes no faces and has held no impromptu news conferences. His social media has been mum on the trial.

Mr. Trump, 78, took a different tack. During his seven-week trial in state court, the former president and presumptive Republican nominee staged the legal equivalent of a sit-in, glumly protesting the proceedings. There were substantial stretches where he was either sleeping or, as he asserted, resting his “beautiful blue eyes.”

He occasionally mumbled complaints under his breath — earning a warning from the judge — while spending much of his time outside the courtroom loudly berating Democrats, President Biden, the Manhattan district attorney and the very air around him. (He complained about the chilly temperature in the courtroom.) Some of his out-of-court comments and online postings caused the judge in the case, Juan M. Merchan, to fine Mr. Trump $10,000 for violating a gag order in the case.

Mr. Menendez is accused of trading favors for cash, gold bars and a Mercedes-Benz convertible; his trial, which just wrapped up its fifth week, is expected to last until July.