A federal judge approved yesterday the settlement of a class-action housing discrimination suit brought by tenants of Arlandria's Dominion Gardens apartments despite complaints by some residents that many blacks and Hispanics will be forced out of their homes.

Several of the tenants, who came to U.S. District Court in Washington in a church bus, walked out of the courtroom as U.S. District Judge Harold H. Greene announced his ruling at the end of a sometimes contentious 1 1/2-hour hearing.

"I don't have a pot of gold sitting here under the bench that I can give to tenants to live in better conditions," Greene said, telling the tenants that if they went to trial in the case they might not win.

To prevail, Greene said, the tenants would have to prove that the Bethesda-based Artery Organization intended to discriminate against blacks and Hispanics when the company decided to purchase the 416-unit complex, renovate it and raise the rents. "That is not so easy to prove," Greene warned.

Greene also conceded that his legal interpretations of the Fair Housing Act might ultimately be overturned by the U.S. Court of Appeals. "You might not end up with anything," Greene said. "Then where would everybody be?"

Under the agreement, Artery will set aside 104 units of the complex for five years for low-income residents, who can apply for federal housing subsidies that will limit rents to 30 percent of their incomes.

Several tenants complained that restrictions limiting the number of occupants in a one-bedroom apartment to three and the number in a two-bedroom unit to four will force many of the 200 families still at Dominion Gardens to move.

Barry Goldstein, an attorney for the tenants, said that larger families could "reorganize" themselves into smaller units so they could qualify for the housing subsidies. But some tenants, who now house as many as 10 family members in a two-bedroom unit, said they would not be able to afford the higher rents.

Some tenants questioned how the acceptance of federal housing subsidies might affect illegal aliens in their attempts to gain resident status under the amnesty program.

Aliens are barred from the amnesty program if they are receiving cash federal allotments, such as welfare. But Greene, who did not issue a written order yesterday, said he would specify in his order that the housing subsidies are a remedy for civil rights violations and they should not be counted against amnesty applicants.