Seems like an applet that is inside a DOM container and getting hidden by calling JQuery’s hide() method messes up the applet’s state.
In my case, I got an IllegalStateException and in some cases forced it to restart the applet which in turned messed up the operation that my code is doing.
So rather than using hide, user Danny Coulombe of StackOverflow gave a very workable solution. Using CSS, you can use JQuery to add the class attribute to hide or show the applet. See code.
To hide, call $(‘myapplet’).addClass(‘hide’).
To show, call $(‘myapplet’).removeClass(‘hide’).
A very useful solution to preserve your applet state in case you wish to hide it from the user’s view and show it later on using the same instance.