This content has been marked as final. Show 1 reply
In the tutorials, it is mentioned that stop() will be called to release resources when the user is not viewing the applet (hence when he/she switches tabs) and I need it for the applet.No, that isn't mentioned at all.
What it actually says is this: 'When the user leaves the page, for example, to go to another page, the browser stops and destroys the applet.'
That's not the same thing as 'when the user is not viewing the applet', by a long shot.
In the Javadoc for stop() it says 'It is called when the Web page that contains this applet has been replaced by another page, [my emphasis] and also just before the applet is to be destroyed.'