Cheered, jostled, and occasionally even heckled by his supporters, Polish strike leader Lech Walesa today filed the statues of Poland's new independent trade union with a Warsaw judge.

For a few hours this morning, the scenes at the gray sandstone Warsaw civil court building were reminiscent of the 18-day occupation of the Lenin Shipyard in Gdansk last month. Legal decorum was swept aside as union activists, cameramen, journalists, and court officials literally fought their way into court to begin the process of registering the first independent labor organization in the Soviet Bloc.

It was all part of a hectic day in the Polish capital for Walesa, a former electrician who led the shipyard strike in Gdansk, and for some 50 delegates who claim to represent at least 3 million workers from all over Poland.

The day started, as is usual for many of the union leaders, with Roman Catholic mass and ended with a packed press conference for foreign and Polish journalists in the headquarters of Interpress, the government information agency.

Hundreds of supporters were gathered outside the courthouse when the union delegation arrived in several tourist buses emblazoned with wordd solidarnosc (solidarity) -- the slogan used by the Gdansk strikers that has now become the name for the new unions. There were loud cheers and chants of Walesa's name when he arrived wearing a large lapel badge depicting the Black Madonna of Czestechowa, Poland's holiest symbol.

The object of the visit was to hand over a copy of the union's draft statutes for registration under Polish law. The court must decide whether or not the union can legally be constituted in its present form. But just in case there should be any difficulty, Walesa talked vaguely about "strike action."

The right to strike is included in the 44-point statute of the new union. So too is a stipulation forbidding Solidarnosc members from belonging to the now largely discredited official unions.

Inside the courtroom, some delegates grew nervous as mumbled comments were exchanged with the judge, who was surrounded by a phalanx of TV cameramen standing on chairs. There were protests about the chaotic nature of the proceedings, and finally Walesa shouted out reassuringly: "We're not signing anything, we're just submitting our statues, and now we're going off to see the deputy prime minister."

The union leadership also had a meeting with senior Communist Party officials, including Mieczyslaw Jagielski, the deputy prime minister who negotiated the Gdansk agreement on behalf of the government. At the meeting, the delegates made a strong protest against a mounting campaign in the state-controlled media against dissident organizations, including the Workers' Defense Committee, KOR in its Polish acronym.

Walesa expressed particular concern at a television news item on Tuesday night in which KOR spokesman Jacek Kuron was shown suggesting that workers would "burn down the Communist Party offices and hang the apparatchike." After the clip, a commentator described Kuron's statement as "revolting" and diametrically opposed to the mood of hope felt by the workers.

According to the workers' committee, the quote was taken out of context from a filmed interview by Swedish television last July. Committee members said the editing of the film destroyed the sense of Kuron's argument, which was that there would be a danger of provoking violence if the government tried to crush the strikes by force.

While wary of associating his movement directly with KOR or other dissident groups, Walesa has made clear that he was grateful for their support in the past and will defend them in return.

At today's meeting, Walesa was reported to have told Jagielski: "These attacks seem directed against those forces who helped make the independent unions a possibility and who opposed thos abuses that are now being recognized by the party itself."

Jagielski, whose patience and sympathetic attitude later drew praise from Walesa, explained that he wanted to dispel suspicions that the government was unwilling to cooperate with the new unions. This assurance did not altogether satisfy the delegates, who complained of harassment by some local officials and censorship of union activities in the press.

Another point of friction was the appointment by the government of a team of experts to draft a new law on trade unions. Seven former strike leaders, including Walesa, have been named to the 24-hour team, but the Solidarnosc presidium complained that they had not been consulted about the composition of the body.

At his press conference in the evening, Walesa drew laughter when he was asked by a Soviet correspondent about the origin of union finances. He replied: "We have received funds from our friends in the trade unions in Western countries. We have also received money from individuals in socialist countries, but not from the trade unions in these countries."

Contributions by Western labor organizations to the new unions have led to charges in the Soviet news media that contributions were evidence of collusion with "antisocialist forces abroad."

Asked whether he feared competition from official unions, Walesa joked: "Tell the truth, we are afraid that there won't be any other unions. We're getting 90 percent of the members and they're losing members all the time. I've proposed giving them a subsidy to help them out."

On the way to the Cabinet office after leaving the court building, Walesa walked to the tomb of Poland's unknown soldier in Victory Square for a wreath-laying ceremony.

Most Warsaw passer-by seemed delighted to have a celebrity in their midst. Workers in high-rise offices opposite the court building lined the windows and waved enthusiastically as the procession marched on its way, led by two men carrying a large banner reading "independent self-governing trade unions."