Debug Statements on the Console
I got a bit worried in these long computations. Was the program running OK?
So I used a useful dodge of inserting print statements to the Java Console
(if(i%5000 == 0 ) System.out.println("Generating " +i);)
Program wrote a message every 5000 trials.
I also wrote out some messages in paint method to show it had got there.
Note messages in paint are repeated each time page reloads but earlier messages from init are not.