And a side question for anybody who is reading this: do you think that the same thing can happen for Iraq and Afghanistan, in regards to making a somewhat stable country?
The Potsdam document outlined that the Japanese were to lose their empire and freedom would be restored to the Japanese people. But there were two other documents that were drafted after the surrender that turned the occupation of Japan into a full scale rehabilitation. It called for completely demilitarizing Japan, its economy and culture would be completely purged of any sort of militarism.
They started by democratizing the society of Japan. Laws passed in the 20's and 30's that curtailed freedom of speech and freedom of assembly were lifted. The secret police and other organizations of that ilk were abolished. Hundreds of political prisoners were given their freedom, even communist dissenters were let go. Government control over school curriculum was loosened and liberalized, and women were given more freedom. The Japanese "State Shinto" was abolished as it encouraged treating the Emperor as a God, and it was seen as a symbol of ultra nationalism.
The economy was liberalized as well. Land reform was instituted, ending the power of the despotic landlords that held great swathes of land in rural Japan. Unions were no longer repressed, and the Americans began to rebuild Japan's shattered industry and economy. A new constitution was also written up which guaranteed rights to the Japanese citizens while retaining the Imperial system.
The American experiment with Japan clearly worked, mainly because they were willing to take the time and effort to basically build a nation, culture, and economy from the ground up.
Source:
Embracing Defeat by John Dower