If your budget is only $400, then I'd suggest you rethink building your own. You won't be able to match the performance of a Dell or HP computer at that price point, and you won't have any type of guarantee once put together.
I always build my own computers, but my target is higher up the food chain than the very basic build you would get for $400. Do you need to include an operating system and monitor in the costs for this build? Those two items alone will be in the neighborhood of $200.
Take a look at this basic build at Anadtech for an AMD based computer: http://www.anandtech.com/guides/showdoc.aspx?i=3528&p=2 You'll see the parts for the main part of the computer add up to $322....the operating system and monitor really jump the price upward.
The Intel based computer they've come up with on the next page is slightly cheaper, but I don't like their choice for a case and power supply combo. The HEC cases aren't bad, but the power supplies they are including now are way overrated on power output and not worth the money.
You might want to look through the Budget Box build at Ars Technica too: http://arstechnica.com/hardware/guides/2008/09/guide-200809.ars/2