Developing Swing applications is not a simple task. There seem to be multiple alternative ways to achieve a required result,
and in most cases the correct solution requires some
"unwritten knowledge." Unfortunately, it is very easy to write
Swing applications that break various rules--rules that are not
enforced by the runtime--which results in visual artifacts,
unresponsive or frozen UIs, and unnecessary CPU consumption. This
article shows a few simple techniques that can help debug these
problems for even the most complicated Swing applications.