LWJGL Forum

Programming => General Java Game Development => Topic started by: swuth on August 06, 2009, 19:50:49

Title: Refresh/ Reload in browser crashes applet.
Post by: swuth on August 06, 2009, 19:50:49
Hi,

I have a game applet that is pretty much done, the remaining problem is the fact that if I hit reload/refresh. or navigate away from the applet and come back, the applet crashes. Is there a way to check for "refresh/reload, navigate away etc, so I can shut down the app properly and force it to reload when you go back?

Thanks
Title: Re: Refresh/ Reload in browser crashes applet.
Post by: elias4444 on August 06, 2009, 21:01:24
Just had this problem recently myself. I was kindly directed to the AppletGears demo in the source code package. Check out how they start/stop (using notify's). Do it that way, and it'll fix your problem.
Title: Re: Refresh/ Reload in browser crashes applet.
Post by: swuth on August 06, 2009, 21:49:05
Awesome thanks,  where do I find that source code? :)

CH
Title: Re: Refresh/ Reload in browser crashes applet.
Post by: elias4444 on August 06, 2009, 23:11:49
Go to the LWJGL downloads and download the source package.
Title: Re: Refresh/ Reload in browser crashes applet.
Post by: kappa on August 09, 2009, 23:21:05
or have a look here http://java-game-lib.svn.sourceforge.net/viewvc/java-game-lib/trunk/LWJGL/src/java/org/lwjgl/test/applet/GearsApplet.java?view=markup