Hi
maybe it help you:

First part :
=======
open a new web page from a applet:
see java.applet.AppletContext's javadoc about showDocument(Url url,
String target);
example:
[code]
try
{
URL url = new URL(getCodeBase().toString() + "java3DTestPage.html");
showStatus("Openning a Java3D page test " + url.toString());
getAppletContext().showDocument(url, "_self");
// use "_blank" for a new web browser instance
}
catch (Exception exc)
{
// some error handling here
}
[/code]


Second Part: ========= to show a vrml model: You must add a vrml loader, as a extra jar file to be downloaded by clients JRE plug-in : From Plug in page I found the below :

<APPLET CODE="AppletSubclass.class" ARCHIVE="file1, file2"
       WIDTH=anInt HEIGHT=anInt>
</APPLET>


were file1 is your jar or zip file with your code, and file2 is a extra jar or zip file with extra libraries.


In your case the vrml97.jar file.

Another example, build as tips give from Java One 2002's "Java™ Plug-in Software
Advanced Topics" :

<APPLET CODE="My3Dmodel.class" WIDTH=300 HEIGHT=200>
<PARAM NAME=cache_archive VALUE="my3DProject.jar,vrml97.jar">
<PARAM NAME=cache_version VALUE="1.0.0.0,2.0.0.0">
</APPLET>

where my3DProject.jar is the file with your compiled classes, and
vrml97.jar is your vrml loader lib.
see
http://java.sun.com/docs/books/tutorial/applet/appletsonly/html.html

Another (simplier) way is load a LWS or OBJ model instead a vrml model.
As you know, LWS and OBJ are "native" supported by Java3D, so there is
no need of extra loader's downloads ;)

There are some nice 3D converters in the web. Use Google.
Alessandro

Serge Bernier escreveu:

Hi all,

I have a JApplet displaying some 3D stuff and I want to lauch a vrml file in
another explorer page from my applet after a button have been pusch. Does
anybody know how to code this?

Serge Bernier

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".




=========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to