The problem is with your while loops. They are executing on the EDT, which is eating up all your resources and not allowing your program to paint (which is also done on the EDT).

You're going to...