Japanese culture and racism is nothing new. In a country where 98% of the people are ethnically Japanese, you're bound to have a bit of "us" and "them" when it comes to foreigners (gaijin) and their strange ways. Yet Japan also has a real love afar with all things foreign, particularly those from the West, but also recently with Korean cultural imports, like Korean soap operas and pop idols.
One must also take into account the fact that Japan is an island nation with a history of closing the doors to foreigners when their influence was deemed "unwelcome." And then, of course, no discussion of racism in Japan is complete without mentioning Japan's military aggression against its Asian neighbors in WW II, which was driven in part by a feeling of racial and cultural superiority.
To read more about this aspect of Japanese history, read: Japan's Minorities: The Illusion of Homogeneity (Sheffield Centre for Japanese Studies/Routledge Series)
An excellent article on Japanese culture and racism appeared recently in The Japan Times. An American college vice president in Japan argues that westerns living in Japan exaggerate the extent of Japanese racism toward foreigners.