Actually, I used Jalopy (
http://jalopy.sourceforge.net), which actually blows away the built-in IDE beautifiers when it come to customization. It ran stand-alone or as a plug-in to most popular IDEs. Could even be set up to do batch processing to enforce formatting on entire projects.
Originally, and in the SourceForge version, it was free software. It seems to have been converted to commercial software now ($40/seat). And it may be orphaned entirely now, alas - last update seems to have been in 2010.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.