Justice John Paul Stevens, becoming the fourth member of the Supreme Court to make off-the-bench comments on a hotly disputed ruling on public access to criminal courtrooms, yesterday chided press spokesmen "who seemed to fear that the majority's decision has removed the cornerstone of our constitutional ediffice."

Stevens -- the only member of the five-to-four majority who didn't file a separate opinion in the so-called Gannett case -- also mocked unnamed newspaper editors for seeming to predict their "early demise . . . in consequence of the Supreme Court's refusal to accord them a variety of special privileges in recent years."

In a clear reference to the American Civil Liberties Union, among others, Stevens scorned "prophets of doom" who "argue that the Watergate scandal would never have been exposed if Gannett and other cases had been decided a few years ago."

That argument "has no merit," Stevens said. "There is no reason to believe that any trial judge or any prosecutor would have acted any differently than he did if he had foreseen Gannett or any of the other opinions that had been so severely criticized in the recent past."

Stevens expressed his views in a speech at the University of Arizona School of Law in Tucson. An advance text was distributed Friday by the court's press office.

The Gannett case arose from the exclusion of a news reporter from a criminal pretrial hearing on a motion -- made by the defense and agreed to by the prosecution -- to suppress certain evidence.

The Supreme Court ruling, handed down July 2, the final day of the 1978 term, was that only an accused -- not the general public, including the press -- can assert the right to a public trial guaranteed by the Sixth Amendment to the Consittution.

Although the case immediately involved only the possibility that an open suppression hearing could prejudice potential jurors in the subsequent trial, Justice Potter Stewart, in the majority opinion, went beyond this. The Sixth Amendment gives the public "no constitutional right . . . to attend criminal trials," he wrote.

In a separate opinion, and in a press interview a few weeks later, Chief Justice Warren E. Burger insisted, however, that the decision was limited to pretrial suppression hearings.

Justice Harry A. Blackmun, who wrote the 44-page dissent, disagreed, as did Justice William H. Rehnquist. Blackmun, in a talk to federal judges in South Dakota, said that "despite what my colleague, the chief justice, has said, the opinion authorizes the closing of full trials."

Lewis F. Powell Jr., in joining the five-member majority, filed a separate opinion saying that under the First Amendment, the press has a right to attend pretrial proceedings that, while outweighed in the Gannett case, should be balanced against the Sixth Amendment. In a talk to lawyers, he cautioned that it may be "a bit premature" to cast the majority ruling too broadly.

Until the Gannett case, it had been rare for even a single justice to comment in any non-judicial form on any ruling. That four justices have commented on Gannett is seen by some observers as further evidence of behind-the-scenes disarray in the court and of disquiet among its members that some trial judges have applied the ruling to close trials to the public.

If the court wants to clarify the situation, it may do so if only four of its members vote to accept for review, in the term starting Oct. 1, a case in which two Richmond, Va., newspapers challenge a judge's order to close an entire, two-day murder trial.

Yesterday, Stevens discounted fears that trial judges "routinely" will conduct entire trials in secret, even though some judges "may occasionally enter maverick orders."

Repudiating allegations of an antipress bias in the court, Stevens said that it has faithfully vindicated "the core principle" that the First Amendment protects "the right of the press to publish, or to decide what not to publish."

At the same time, he said, the court consistently has refused to extend First Amendment protection to a right to access to newsworthy matter. In doing so, he said, the court, rather than withdrawing previously available protections, simply has been refusing to give the press special privileges by developing or recognizing "new rules of law."