Whenever a disconnect happens, the game seems to initiate an unchecked loop to (maybe) try and reconnect to the server. It will continue until who knows how many hundreds of millions of tries, but the problem is that the loop is unchecked. It will happily use up every last bit of CPU resource it can and cause whatever browser the applet is running in to freeze completely.
Solution: Put the loop on a timer. Have it repeat 16 times a second or something. Just don't let it run as fast as it can.