I'm testing exporting my game to put up online, and I'm running into some kind of difficulty with the applet loader.
Here's my Applet Code:
<html>
<head>
</head>
<body>
<applet code="org.lwjgl.util.applet.AppletLoader"
archive="lwjgl_util_applet.jar"
codebase="."
width="960" height="640">
<param name="al_title" value="DemonCycle">
<param name="al_jars" value="lwjgl.jar, slick-util.jar, lwjgl_util.jar, game.jar">
<param name="al_main" value="DemonCycle.GameApplet">
<param name="al_windows" value="windows_natives.jar">
<param name="al_linux" value="linux_natives.jar">
<param name="al_mac" value="macosx_natives.jar">
</applet>
</body>
</html>
And here's the GameApplet file it points to:
package DemonCycle;
import java.applet.Applet;
@SuppressWarnings("serial")
public class GameApplet extends Applet{
//Fields
private Game game;
//Constructor
//No Constructor
public void init(){
try {
game = new Game();
game.setSize(getWidth(),getHeight());
add(game);
game.setFocusable(true);
game.requestFocus();
game.setIgnoreRepaint(true);
setVisible(true);
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException("Unable to create display!");
}
}
public void start(){
}
public void stop() {
}
public void destroy() {
remove(game);
super.destroy();
}
}
All of the OpenGL Initializing code is in the Game class which extends the Canvas class. The applet runs fine in Eclipse, but when I use the Applet Loader, I get a super quick flash of the loading screen and then nothing. Am I missing something? Everything's signed.
Thanks again. You guys are incredibly helpful.