Hi everyone,
I'm new here, and new to almost everything that is discussed in that forum, so please be gentle and excuse my ignorance

I'm use to develop in C++, but I decided to try Java, in order to develop applications for web, and actually, I decided Java only to try 3D on the web, that's why i got interested in LWJGL.
Right now, I have a problem when launching the applet on a navigator : I tried to create an applet with NetBeans, on which I added an AWTGLCanvas (actually, the Gears demo). When I try the applet from NetBeans, there is no problem, everything works fine. But when I try to put it in a web browser, difficulties start : The applet launch all its "stuff" (excuse my vocabulary), but is stuck in the phase when it prints "Switching Applet". And then nothing happens. Here is the code of my applet :
import java.awt.*;
import javax.swing.*;
import java.lang.*;
import org.lwjgl.LWJGLException;
public class Test extends java.applet.Applet implements Runnable {
Thread tr ;
Gears mCanva ;
Button mBouton;
public Test()
{
if(tr==null)
{
tr = new Thread(this);
tr.start();
}
}
public void run()
{
while (true)
{
repaint();
try
{
Thread.sleep(1000);
}
catch(InterruptedException e)
{
}
}
}
public void init ()
{
try
{
mBouton = new Button("Hello World") ;
mBouton.setBounds(0, 0, 200, 20);
add( mBouton ) ;
mCanva = new Gears() ;
mCanva.setBounds(0, 50, 200, 200);
add(mCanva);
}
catch (LWJGLException e)
{
JOptionPane.showMessageDialog(null,"Test","Erreur",JOptionPane.ERROR_MESSAGE);
throw new RuntimeException(e);
}
}
public void update(Graphics g)
{
paint(g);
}
public void paint(Graphics gsp)
{
mCanva.paintGL();
}
}
Here, Gears is just the AWTGearsCanvas class of which I changed the name.
and here is my HTML code :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>AppletLoader</title>
</head>
<body>
<applet code="org.lwjgl.util.applet.AppletLoader" archive="lwjgl_util_applet.jar" codebase="." width="640" height="480">
<!-- The following tags are mandatory -->
<!-- Name of Applet, will be used as name of directory it is saved in, and will uniquely identify it in cache -->
<param name="al_title" value="Test">
<!-- Main Applet Class -->
<param name="al_main" value="Test">
<!-- logo to paint while loading, will be centered -->
<param name="al_logo" value="appletlogo.png">
<!-- progressbar to paint while loading. Will be painted on top of logo, width clipped to percentage done -->
<param name="al_progressbar" value="appletprogress.gif">
<!-- List of Jars to add to classpath -->
<param name="al_jars" value="lwjgl.jar, jinput.jar, lwjgl_util.jar, Test.jar">
<!-- signed windows natives jar in a jar -->
<param name="al_windows" value="windows_natives.jar.lzma">
<!-- signed linux natives jar in a jar -->
<param name="al_linux" value="linux_natives.jar.lzma">
<!-- signed mac osx natives jar in a jar -->
<param name="al_mac" value="macosx_natives.jar.lzma">
<!-- signed solaris natives jar in a jar -->
<param name="al_solaris" value="solaris_natives.jar.lzma">
<!-- Tags under here are optional -->
<!-- Version of Applet, important otherwise applet won't be cached, version change will update applet, must be int or float -->
<!-- <param name="al_version" value="0.1"> -->
<!-- background color to paint with, defaults to white -->
<!-- <param name="al_bgcolor" value="000000"> -->
<!-- foreground color to paint with, defaults to black -->
<!-- <param name="al_fgcolor" value="ffffff"> -->
<!-- error color to paint with, defaults to red -->
<!-- <param name="al_errorcolor" value="ff0000"> -->
<!-- whether to run in debug mode -->
<!-- <param name="al_debug" value="true"> -->
<!-- whether to prepend host to cache path - defaults to true -->
<param name="al_prepend_host" value="false">
</applet>
<p>
if <code>al_debug</code> is true the applet will load and extract resources with a delay, to be able to see the loader process.
</p>
</body>
</html>
Someone has an idea ?