Overriding the paint() method is not a good idea unless you really know what you're doing as in you designed and wrote the Java language (almost).

The reason you're in a continuous loop is because...