An evening with intense political overtones ended on a more relaxed note last night, with President and Mrs. Carter waltzing slowly across the marble floor of the White House foyer while the Marine Band played "You'll Never Walk Alone" and guests crowded around in a circle to watch.

They had just escorted Mr. and Mrs. Kriangsak Chomanan to their limousine, parked at the North Portico, marking the formal end of a state dinner in honor of the prime minister of Thailand. Clearly relaxed and happy, the Carters stopped to chat with the bandmaster and thank the band for the music before wishing their guests good night and retiring.

Earlier, the toasts at the state dinner had reflected current tensions in Southeast Asia, where the Vietnamese invasion of Cambodia has flooded Thailand with refugees and given the Vietnamese army direct access to a long frontier with Thailand.

President Carter said he was "concerned about recent developments in Cambodia" and condemned "this violation of international borders" as "a threat to the peace of the region." But he added that, "Thailand stands like a rock, honored and respected not only by friends and allies, but honored and respected by potential enemies."

Chomanan said the subjects of his discussions with Carter were important "for my country, for Southeast Asia and perhaps for the whole world." He noted that many of the problems discussed "start beyond our borders but impact heavily on Thailand."

Carter's toast was "unusual in detail," remarked Sen. Jacob Javits (R-N.Y.). "The situation is very severe," he said. "The Vietnamese are on the march."

Sen. John Glenn (D-Ohio), chairman of the East Asian and Pacific Affairs subcommittee of the Senate Foreign Relations Committee, said that the troubled area is "one of the most rapidly advancing in the world, with one-third of the human race. U.S. trade with it in six years has exceeded that with Europe." In the new emphasis on Southeast Asia, he said, the United States is "not deserting NATO; all we're doing is adding to our relationships around the world."

In an after-dinner conversation, the prime minister did not seem unduly concerned about the Vietnamese threat. The refugee problem is serious, he said, but the military threat is "one we can cope with."

He added that he has not changed his earlier plans for a visit to Moscow, as some Thai papers had conjectured he might. "I've got to go," he said. "The visit was planned some time before, and I have seen no reason to change my mind."

He described his visit to the United States as an effort to "speed up our shopping list," and said he is "not sure" whether he can influence Moscow to stabilize the situation in Vietnam.

"It's their business, not mine," he said.

The evening's entertainment was provided by The American Dance Machine, a ballet company which preserves the choreography of bygone American musical shows -- an art that seemed destined to vanish into history until choreographer and director Lee Theodore began to reconstruct the numbers, relying on the memory of dancers and choreographers from the original productions.

Dances performed ranged from the haunting Funeral Dance from "Brigadoon" to the loud and comically tipsy Clog Dance from "Walking Happy." Agnes De Mille, choreographer of "Brigadoon" and many other shows, was a guest of honor and the narrator of the segment of the show dealing with her work. She recalled that when they had first seen the funeral dance the financial supporters of the show were horrified and demanded that it be dropped, but she used all her prestige to insist on at least one performance and they agreed because "it's only Boston."

"That was in March 1947," she said, "and we've been doing it ever since."

In his introduction, President Carter said that until The American Dance Machine began to revive them, the Broadway dance numbers looked like "an endangered species," but now, "They will be preserved for generations yet to come."

After the performance, the president went on stage and kissed each of the women in the company, pausing at one point, to remark, "Now, you know why I like being president." Mrs. Carter shook everyone's hand.

Even amid the serious tone of the toasts at the state dinner, President Carter did find room for one elephant joke. In the early 1860s, he recalled, the king of the country then known as Siam had offered Abraham Lincoln "a fleet of elephants to help expedite the end of the War Between the States. Fortunately for the South, Lincoln did not accept the gift -- otherwise, the North might have won the war and, considering the elephants, Lincoln might have become a Republican."

The following were guests at last night's White House dinner for Thailand Prime Minister Kriansak Chomanan and Mrs. Chomanan : Deputy Prime Minister Sunthorn Hongladarom Minister of Foreign Affairs, Dr. and Mrs. Upadit Pachariyangkun Minister of Interior, Gen. and Mrs. Lek Naeomali Minister of Communications, Gen and Mrs. Surakij Mayalarp Mr. and Mrs. Somporn Punyagupta, minister attached to the prime minister's office Minister of Industry and Mrs. Kasame Chatikavanij Deputy Interior Minister Prem Tinsulanonda Deputy Defense Minister, Gen and Mrs. Yose Devahasdin Thailand Ambassador and Mrs. Visessurakarn Gen. and Mrs. Porn Dhanabhumi, secretary-general to the prime minister Secretary of State and Mrs. Cyrus Vance National Security adviser and Mrs. Zbigniew Brzezinski Sen. and Mrs. Frank Church Sen. Jacob K. Javits Sen. and Mrs. John H. Glenn Sen. and Mrs. John C. Danforth Rep. and Mrs. Jamie L. Whitten Rep. and Mrs. William D. Ford Rep. and Mrs. Lester L. Wolff Rep. and Mrs. Charles B. Rangel Rep. and Mrs. Berkley Bedell Rep. and Mrs. Doug Barnard Jr. Under Secretary of State and Mrs. David Newsom Joint Chiefs of Staff Chairman, Gen. and Mrs. David C. Jones, USAF Ambassador to Thailand and Mrs. Morton I. Abramowitz Chief of Protocol Evan S. Dobelle Assistant Secretary of State Richard Holbrooke National Security Council staff member and Mrs. Nicholas Platt Mr. and Mrs. Hubert L. Harris Jr., assistant director for congressional relations, OMB Mr. and Mrs. Charles O'Keefe, presidential health adviser Mr. and Mrs. Frank T. Davis Jr., general counsel for reorganization Mr. and Mrs. Thomas H. Boggs Jr. Mr. and Mrs. Don Campbell Mr. and Mrs. Donald Carter Mr. and Mrs. Lewis Budd Calisch Miss Marian Christy Mr. and Mrs. William M. Daley Miss Agnes de Mille Mr. and Mrs. S. Harrison Dogole, chief executive, Globe Security Systems Inc., Philadelphia Mr. and Mrs. Walter Dunfey Mr. and Mrs. Lloyd Engelsma, president, Kraus-Anderson, Minneapolis Mr. and Mrs. Murray Finley, president, Amalgamated Clothing and Textile Workers Union, New York Mr. and Mrs. Ed Fouhy, vice president, director of CBS News, Washington Dr. and Mrs. William C. Friday, president, University of North Carolina Mr. and Mrs. Murray Gart, editor, Washington Star Mr. and Mrs. Bernard Geis, president, Bernard Geis Associates, New York Mr. and Mrs. Elliot Goldstein Mr. and Mrs. Earl G. Graves, publisher, Black Enterprise Magazine, New York Mr. and Mrs. Robert E. Knowles Mr. and Mrs. Robert D. Knox, president, Wayne State University Mr. and Mrs. Charles Kuhn Major Edward J. Land Jr. Mr. and Mrs. Nathan Landow Mr. and Mrs. C. Payne Lucas, executive director, AFRICARE, Washington Mr. and Mrs. James Mathis Mr. and Mrs. Paul McEachern Mr. and Mrs. Thomas W. McGee, speaker of the Massachusetts House Mr. and Mrs. John G. McMillian, chairman, Northwest Energy Co., Salt Lake City Mr. and Mrs. Alan Novak Ralph A. Pfeiffer Jr., chairman, IBM World Trade, Americas/Far East Corp., North Tarrytown, N.Y.; Jane Cahill Pfeiffer, chairperson, NBC board of directors Dr. and Mrs. Alvin Poussaint Mr. and Mrs. Charles A. Ravenal Mr. and Mrs. Bob L. Schieffer Mr. and Mrs. Lee Sessions Mr. and Mrs. Peter Stone Mr. and Mrs. Richard Swann Dr. and Mrs. George Tanham Mrs. Lee Theodore, founder and director, American Dance Theater Mr. and Mrs. Jerry Weintraub Mr. and Mrs. Wendell Young, president, Pennsylvania Retail Clerks Union, Philadelphia