The trial of John W. Hinckley Jr., accused of the attempted assassination of President Reagan, opened yesterday with the time-consuming process of screening 90 potential jurors to find the 12 who will decide his case.

Hinckley, 26, wearing a khaki suit and a tie, sat practically motionless at the defense table during the tedious procedure of questioning the jurors, which could take another day or two to complete. When he was asked by Judge Barrington D. Parker to stand to see whether any of the jurors knew him (none did), he turned self-consciously to face them, his right hand resting on his jacket pocket.

During the proceeding, Assistant U.S. Attorney Roger M. Adelman said that President Reagan may appear as a witness at the trial.

The government's list of 106 potential witnesses in the case, which was read to the jurors yesterday, includes U.S. Secret Service Agent Timothy McCarthy and retired D.C. police officer Thomas Delahanty, both of whom were wounded during the shooting, but not Reagan's press secretary, James Brady, who suffered lasting injury.

The prosecution's potential witnesses also included a long list of FBI agents, surgeons who treated the wounded men, the chief of the president's security detail, the White House photographer, a news reporter and broadcast technicians who were at the scene of the shooting.

Hinckley's chief lawyer, Vincent J. Fuller, read the jurors a list of 30 potential witnesses for the defense, including Hinckley's parents, his brother, sister, and brother-in-law, several doctors and actress Jodie Foster, whose testimony has already been videotaped. Law enforcement officials believe Hinckley was infatuated with Foster and shot Reagan to impress her.

Hinckley, who is being housed in a cell in the basement of the courthouse for the duration of the trial, contends that he was insane at the time of the incident and thus should not be held criminally responsible for his acts. The prosecution is expected to argue that Hinckley made a deliberate and planned attack on the president and that he suffers no serious mental illness that should excuse him from responsibility.

Teams of psychiatrists and psychologists for the prosecution and the defense will testify at the trial about Hinckey's mental state at the time of the shooting.

Despite elaborate preparations for a possible heavy turnout of onlookers, only a handful of citizens appeared yesterday for the opening of the trial.

Court personnel, who had readied the most intensive security in the court's history, were surprised by the small turnout and said they expected larger crowds once testimony begins.

Court officials had cordoned off the west entrance to the building in expectation of long lines of press and public. But only three persons were in the public line when the court opened at 7 a.m. In the press line, Robert Brown, 26, and his friend Merrill Wallenstein had camped out since midday Monday with food, coffee, lantern and sleeping bags. They were paid $7.50 an hour to stand in line to hold places for The Dallas Times Herald, which was vying for one of eight press seats not already assigned.

In the public line, Gerald Resnick, a 29-year-old New Jersey lawyer who moved to the Washington area three months ago, said, "I want to see a part of history, and I like to see the techniques other lawyers use." Resnick, who said he also attended parts of the celebrated Karen Ann Quinlan trial in New Jersey, later declared the opening day "tedious."

In the courtroom yesterday, the 90 potential jurors, who were addressed by number and not by name, included CBS White House correspondent Bill Plante, who told Parker that he sees Reagan regularly and has known Brady about 10 years. As Plante recounted his White House contacts, Parker, who knew him only as juror No. 276, asked his courtroom clerk who Plante was.

The jurors were asked to answer a variety of questions in open court, such as whether they knew any of the lawyers in the case, whether any of them had relatives in law enforcement jobs, whether any of them had studied law or psychology or ever practiced medicine.

By mid-afternoon, Parker and the lawyers for both sides began questioning each juror in private about their opinions, if any, on insanity, mental illness and psychology and any other "personal experiences" that would prevent them from serving as jurors in the case.

Parker said he would also ask them whether they had formed any opinions about the case from news reports and would be able to put those opinions aside at Hinckley's trial. All the jurors indicated to the judge that they had read or heard something about the shooting.