The joke used to be that if the Vietnamese wanted to invade Thailand, the only thing that would stop them would be a Bangkok traffic jam.
As it is, Vietnam has had more than enough trouble at home, and in Kampuchea (Cambodia).
Thailand has become the domino that didn't fall.
But in the spring of 1975, when Kampuchea fell to the Khmer Rouge and South Vietnam to the North Vietnamese, a number of foreign observers thought that Thailand would have to accommodate.
The Thais were famous for shifting with the prevailing wind. The bamboo, it was said, might not break but it would have to bend.
Some foreigners thought Thailand was in for such bad times that they sold their companies at fire-sale prices. Foreign investment in this nation at the geopolitical heart of Southeast Asia plummeted. Americans had once been told by their leaders that Thailand would fall if its Indochina neighbors went communist , and they had done so.
''A recurring nightmare these days of both foreign investors and local VIPs is that some years hence they may be kicking each other in the face in a desperate struggle to board the final evacuation helicopters lifting off from Bangkok,'' wrote Jeffrey Race, an American scholar, for the Institute of Current World Affairs, in April 1976. He predicted this would not happen, and he was right.
A reporter returns to Thailand after a six-year absence to find that this nation of some 48 million people is in many ways doing well.
The old problems are still there, however: corruption and injustices, the rich-poor gap, and the Bangkok-countryside gap. Or as a Thai newspaper headline once put it: ''Bangkok vs. Thailand.''
A crowded, polluted, hectic city of 6 million, Bangkok is out of control. But it lives better than the rest of the country, and it makes most of the decisions for the rest of the country.
The days when Bangkok's canals earned it the title ''Venice of the East'' are long gone. Most of the canals have been filled in and the boats replaced by some of the noisiest pollution-producing vehicles in the region. Bangkok's madcap taxi drivers seem bent on self-destruction. Crime and violence are major problems.
Thailand has long been much less crowded than most Asian countries. But in recent years, land has been growing scarce. In central and northern Thailand, some farmers have gone deeply into debt and lost their land. Some have moved into Bangkok's ever-expanding slums.
The country's farmers, who made Thailand the major food exporter that it is, have always deserved a better break from landowners, moneylenders, and middlemen - and from the city of Bangkok. Rice prices are kept artifically low just to make life easier for residents of the capital.
Nonetheless, when one compares Thailand with some other countries in the region, it is clear that much is going well. Thailand has maintained impressive economic growth rates of 7 to 8 percent, in real terms, for more than a decade. Real per capita income has been rising on the average at a rate of 4 to 5 percent a year. Over the past few years, the Thais have made tapioca, a once negligible crop here, into a major export product. Indeed, Thailand is a rarity among developing countries in being a major food exporter.
In contrast with the Vietnamese, who have tended to view the ethnic Chinese of Vietnam as a problem, the Thais have tended to consider the Chinese in Thailand to be an asset. It is clear that much of Thailand's business dynamism is the result of a successful integration of a sizable Chinese population into Thai society. Intermarriage among Thai and Chinese elites is welcomed rather than looked down upon. At the same time, the country is getting a grip on its population problem, having reduced the annual birthrate to about 2 percent.
In foreign affairs, Thailand may actually have benefited, in some ways, from having the Vietnamese Army push right up to its border. The country has had to cope with a major refugee problem. But international agencies working in that field have brought to Thailand a major infusion of spending.
The perception that there is a Vietnamese threat has helped bring together the five nations in the Association of Southeast Asian Nations (ASEAN), in which Thailand plays an important role. The withdrawal of American military forces from Thailand at the end of the Vietnam war has helped to concentrate Thai minds.
The United States, in the meantime, has reaffirmed its pledge to come to the aid of Thailand should it be threatened by outside force. But that has apparently not been enough for the Thais, and they have picked up what amounts to an additional security guarantee from China. The Chinese have indicated that should Vietnam attack Thailand, China would once again attack Vietnam.
It was only some 15 years ago that China was in the business of promoting a guerrilla war against Thailand. But the pragmatic leaders in Peking are interested mainly in one thing these days -- making friends in the region who can help them counter the Soviet Union and its friends in the region.
The Chinese have cut their support for the Communist Party of Thailand, thus making Thailand safer from guerrilla war. Some of the oil China used to ship to Vietnam now goes to Thailand.
The Thais, for their part, have let China ship weapons through Thailand to the Khmer Rouge forces fighting the Vietnamese in neighboring Kampuchea.
''Who would have imagined in 1970 that by 1980, the US, China, and the Thais would be lined up together against Vietnam?'' asked a pleased American diplomat.
''The elements of Thai foreign policy are fairly simple,'' said a Western political scientist with long experience in Thailand. ''First, find out who is going to win and get on their side. Second, find somebody else to pay the bills.
''This analyst went on, ''The Thais have made the judgment that the Vietnamese are never going to make anything of themselves as a country because they are so internally divided. The stalemate in Cambodia has been favorable to the Thais, not to Vietnam.
''Vietnam's options against Thailand appear for the moment to be limited. Vietnam has its hands full trying both to suppress the Khmer Rouge and to defend itself against Asia's colossus, Communist China.
A decades-old pattern of rivalry between Thailand and Vietnam has, meanwhile, asserted itself. In an effort to keep the heat on Vietnam, Thailand has played a key behind-the-scenes role in attempting to bring together Khmer factions opposed to the Vietnamese.
On the domestic political front, Thailand has handled itself less adroitly. In April of last year, young Army colonels seized Bangkok in an abortive coup. King Bhumibol Adulyadej and Queen Sirikit opposed the coup, and that helped break it up.
It was not the first time that the royal family had intervened in politics. But each time the sovereigns enter that imperfect world, their standing as symbols of national unity is jeopardized.
The royal image has been sinking of late, at least in the gossipy city of Bangkok, partly because of the crown prince's peccadilloes and partly because of the Queen's alleged involvement in securing promotions for favored Army officers.
Unity is something that distinguishes Thailand in many of its aspects, particularly in comparison with Vietnam. This unity may help to explain why Thailand, of all the states in Southeast Asia, was the only one not to come under colonial rule.
Unity seems to be even more important in some respects than a strong Army. Vietnam has more than a million men under arms. Its Army is among the best in the world, its infantry among the most experienced. But the Vietnamese are still badly divided.
When it comes to tolerating diversity in the interest of unity, the Vietnamese could perhaps learn a lesson or two from the Thais. It is the military who are in charge these days in Thailand. But the military men rule with a relatively benevolent hand.
Within a month of the April coup, some of the Young Turk officers were being given amnesty. The only casualty of the coup was a bystander who was shot by accident. But the military leadership is split into factions. Another coup could occur if certain reforms are not carried out. The Young Turk colonels were concerned about corruption in high places, among other things.
But despite its coups, Thailand's foreign and domestic policies remain fairly steady. Radical change, one way or the other, seems to be ruled out for some time to come. Pragmatism, not ideology, rules. Despite a surface instability, there has long been a consensus as to how to get things done.
The Thais tend to be tolerant of their governments and their governments tend to be tolerant of them. When this reporter covered a Thai military takeover in 1971, the popular saying was ''mai pen rai,'' which can be translated ''never mind.'
'But a ''never mind'' attitude will not help Thailand cope with long-range problems, either at home or abroad.On the home front, the government is going to concentrate less over the next four years on achieving economic growth and more on overcoming some of the inequities in Thai society, Thai economic planners say.
According to a World Bank report, Thailand's draft economic plan for 1982-86 represents a ''significant shift' in policy in the direction of making the distribution of the country's wealth more equitable, particularly in the rural areas.
Thai agriculture had long been able to absorb a growing labor force, but that situation is changing. Bringing forest reserve lands under cultivation is, in theory at least, no longer permitted. The Thais can no longer count so heavily on agriculture to get them through. They must develop their light industries and their nonagricultural exports.
Compared with many other Asian nations, Thailand has been a land of plenty. While there has been poverty, there has been little starvation or malnutrition.But now the Thais must learn to cultivate more intensively, and more intelligently, the rich land with which they have been blessed.
The Thai economic system also faces great difficulties when it comes to deficits, rising prices for oil, a balance of payments problem, and worsened terms of trade.
But these problems may prove to be relatively modest in scope when they are compared with some of the potentially explosive political problems that confront the country.
David Morell, a Princeton University political scientist who has written extensively on Thai politics, thinks that Thailand's political system faces four crises in the 1980s:
* A crisis of legitimacy, which raises questions about the future of the Thai monarchy.
* A crisis of participation, with more and more people demanding a say in political decisionmaking.
* A crisis of equity and justice, with both urban and rural workers demanding a more equitable distribution of the wealth.
* And a search for a new Thai identity in the face of traditions that no longer seem to be adequate.
The Communist Party of Thailand was taking advantage of the inequities in the system and expanding, albeit slowly, up until 1978. At that point, the crisis between its communist mentors, China and Vietnam, tore it apart. Because of that conflict and a reduction of support from China, the party's remnants now appear to be close to collapse. But the situation is still potentially explosive enough, in Dr. Morell's view, for new opposition movements to develop and for the Communist Party eventually to make a comeback.
There have been times in the past, in the midst of crises, when the tradition of tolerance in the Thai system broke down. In 1976, for example, left-wing student protesters were massacred. The country's unity -- based to a great extent on Buddhism and respect for the monarchy -- is now under strain.
The Thai generals, who often could be counted on in the past to help achieve a consensus, are far from united. The King and Queen have aligned themselves openly with one military faction.
Thailand seems to benefit, meanwhile, from a Kampuchea situation that ''bleeds'' Vietnam. But some Thais are uncomfortable about a policy that locks them so closely to China. Some say that in the long run, they fear China could once again become the main threat to this country.
But for the time being, the military rulers of Thailand seem to be fairly content with existing arrangements. Fortunately for them, things have not turned out in this part of the world the way a succession of American presidents warned they might.
American leaders had asserted repeatedly during the Vietnam war years that China was behind North Vietnam, urging it on. As Lyndon Johnson put it at Johns Hopkins University in 1965, if China and North Vietnam won in South Vietnam, ''The battle would be renewed in one country and then another.
''But 10 years later, when Vietnam and Kampuchea fell to Communist armies, what happened was the reverse of this domino theory. The communists turned against each other. The old animosity between Kampuchea and Vietnam was still alive. Asian history, of which so many Americans were so ignorant, defied Communist ideology - and American logic.
The victory North Vietnam won in South Vietnam has turned sour. The Vietnamese are heavily in debt to the Soviet Union.
Given widespread unemployment in Vietnam, it makes sense for Hanoi to be sending Vietnamese workers to the East-bloc countries. But that will only help to pay part of the debt, and the Soviet Union is an ally which drives hard bargains. The Vietnamese are, at the same time, bogged down in a seemingly endless war in Kampuchea.
The Americans are not forgotten in this part of the world. They are in business in Thailand. They help with food aid for Kampuchea. They are even remembered with fondness in some parts of Vietnam. But they are on the sidelines. Like the Japanese, they do business while others fight.
The Soviets, for their part, have clearly made gains from the decades-long conflict in Indochina. They have acquired a strategic foothold in Vietnam.
But what of those who actually fought and won the long wars of Indochina - the Vietnamese and Kampuchean Communists? Those who fought the hardest seem to profit the least.