New York judges think money — taxpayer money, that is — grows on trees.

That’s the only possible explanation for some of the testimony at a public hearing last week of the Special Commission on Judicial Compensation. The panel is trying to decide whether to raise judges’ pay — or, rather, how much to raise it.

To be sure, hikes for judges in New York are overdue. Having not gotten a raise in some 12 years, they’re now paid worse than their counterparts in most other states.

But the judges want hikes in the salaries of some 1,200 jurists — and to the tune of up to 62%, from $136,700 a year to between $192,000 and $220,836.

Only one problem — or, actually, 2.4 billion problems: That’s how many dollars Albany expects to be short next year.

Alas, when state Budget Director Robert Megna chimed in with that unwelcome news at the hearing, he quickly caught an earful.

“Mr. Megna, we are not employees!” shouted Brooklyn Judge John Leventhal, accusing the civil servant of showing “disrespect.”

Disrespect?

How ’bout a dose of reality?

True, even large hikes would amount to a small fraction of the overall state budget.

But, as Megna said, any raise would force steep cuts elsewhere: “We don’t even have the ability to finance the spending commitments that are already in place.”

And a towering jump in pay for judges would send a dangerous message to other state employees — potentially undoing months of careful budget work.

Gov. Cuomo cut his own pay 5% upon entering office and recently struck a deal with leaders of the state’s biggest unions for three-year wage freezes.

Those are responsible moves.

By contrast, the “once and for all” hike judges seek would spread blood in the water — signaling the gimme-gimme crowd to start circling.

Megna is right to oppose any reckless moves here. Judges deserve a raise — but one that’s affordable. Not more.