Chafitz Electronics Inc., one of the country's largest retailers of home computers and specialty electronic devices, has filed for court protection under federal bankruptcy laws because of growing costs associated with a lawsuit.

Steve Chafitz, owner of the Rockville, Md., firm, described the voluntary, Chapter XI bankruptcy petition as an "unusual technical situation" related to a protracted contract dispute with a manufacturer. He stated that unlike most bankruptcy cases, Chafitz's assets of more than $1 million exceed liabilities, and that the company has no secured creditors, no bank debts and no liens.

"We are operating as usual, sales continue to grow and our suppliers continue to ship inventory without delays," Chafitz emphasized in an interview yesterday. He said the 10-year-old company, a pioneer in retailing home electronic games and instruments, would continue a business that he described as "extremely viable." Chafitz is the largest seller of several electronic product lines in the United States.

The lawsuit, which was filed in March 1980, involves a contract dispute between Chafitz and Applied Concepts, a Texas electronic-games manufacturer that had produced a promising chess game to be sold by Chafitz. Legal fees had risen to $140,000 by late April, Chafitz said.

By filing a Chapter XI petition at federal bankruptcy court in Hyattsville, Md., Chafitz said he was seeking to protect his assets and those of his suppliers from being "diluted by legal fees." He said his company had notified Applied Concepts in advance that unless their 15-month contract dispute could be settled, there would be "no alternative" but a bankruptcy court petition.

Without a settlement, Chafitz said, it was likely that either company would appeal a court decision. He said this could increase legal costs to a level of $200,000 or more, "which we couldn't sustain."

With the case before a bankruptcy court, Applied Concepts, with its claim of $407,000 due from Chafitz, is one potential creditor. Chafitz has an annual sales volume of about $7 million, mostly from its crowded retail store on Rockville Pike and from a commercial-sales division.