Basic LWJGL Applet (Wiki)

Started by gutomarzagao, February 18, 2012, 23:54:40

Previous topic - Next topic

gutomarzagao

Hi guys,
I've followed this tutorial, but I couldn't get it work: http://lwjgl.org/wiki/index.php?title=Basic_LWJGL_Applet.
The problem is that the gameThread is finished, but the applet one is not. I've used the Eclipse IDE to test: I run as applet and when I close the applet window (as if I was closing the browser tab), the game closes, but the program continues running.
For a final test I've just copied the last code and I got the same problem.
Have you got this problem?

kappa

Do you have the java console enabled?


kappa

I discovered a while back that as long as you keep the java console open the java process continues running, does closing the console end the java process?

Also which browser are you running? does it have any different behaviour on another browser?

gutomarzagao

Even if I close the console, the program continues running.
I'm not running in any browser. I'm running from Eclipse. It has an Applet Visualizer built-in.
I think it might be a thread issue. Maybe the main thread isn't being finished even after the game thread finishes.

gutomarzagao

After a lot of tests, I've figured out that the problem doesn't happen when I take off these two lines:
display_parent.setFocusable(true);
display_parent.requestFocus();


Does anyone know why it happens?