D.C. Superior Court Judge Frank E. Schwelb, swathed in hospital whites with a plastic tube in one nostril and a bullet wound in his stomach, sat uneasily in his bed at George Washington University Hospital yesterday.

"Maybe I did the wrong thing," he reflected, "but I do feel some pride in not letting a couple of hoodlums get what they wanted."

Schwelb, 47, a veteran government civil rights lawyer appointed to the bench here just last December, was recovering from a wound he suffered Sunday after he refused to hand over his wallet containing $30 to $40 to two would-be robbers near his home in Southwest Washington.

He was shot once in the upper left section of the abdomen by one of the assailants brandishing a small-caliber pistol. The assilants fled empty-handed.

Schwelb was rushed to George Washington University Hospital where doctors operated for 2 1/2 hours late Sunday night and early yesterday. He was removed from the intensive care unit later yesterday and listed in serious but stable condition.

D.C. police said they have not made no arrests in the case and have no significant leads in their investigation. A special team of robbery squad detectives plus several FBI agents mobilized under federal law to investigate crimes against federal and D.C. judges, have mounted a hunt for the suspects.

Groggy from painkillers, the stocky, mustachioed judge said in a brief interview yesterday he had $30 to $40 in his wallet at the time of the robbery attempt "but didn't want to lose that money or my credit cards."

Aware of the standard warning by police departments for robbery victims not to resist or refuse compliance with their assailants. Schwelb said, "Maybe I was foolish. I don't know. I didn't know if they were going to shoot me."

He said the tactic of withholding his wallet had worked in another robbery attempt against him here about nine years ago.

"Two guys came up and asked me for my wallet, and watch, and I said, "What do you want, man?' -- and they fled," Schwelb said.

This time, it didn't work.

Schwelb said he had just parked his car Sunday night near his high-rise apartment building, the Capitol Park Twin Towers at 101 G. St. SW, when two young men approached him. One said "Let's have your wallet."

"I said, 'What in the hell?" or something like that. I don't remember the exact words," Schwelb said. ". . . I didn't resist. There was no physical contact . . . but my instinct was to go slow, to go step by step, and see if they would run away -- but they didn't run away."

The confrontation, he said, lasted less than a minute.

Police said there is no indication the shooting is connected with Schwelb's judicial duties.

A graduate of Yale College and Harvard Law School, Schwelb served in the civil rights division of the Justice Department for many years, becoming chief of the division's housing section.

In 1967, he was named the Younger Federal Lawyer of the Year by the Federal Bar Association.

A native of Prague, Czechoslavakia, and a naturalized citizen, the bachelor judge is known for his diligence and long hours, working sometimes 75 hours a week.

He was nominated last September by President Carter to serve as one of the 44 judges of the Superior Court here and confirmed by the Senate in December.

"I mainly look forward to gong back to court," Schwelb said yesterday. "I love my work."