wood burning stoves 2.0*
The moose likes Applets and the fly likes JApplet not working properly in Web browser Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "JApplet not working properly in Web browser" Watch "JApplet not working properly in Web browser" New topic
Author

JApplet not working properly in Web browser

Haider Ali
Greenhorn

Joined: Sep 21, 2001
Posts: 2
I'm trying to make an Applet work that extends JApplet with certain swing features.When I run this applet in appletviewer it works perfect, but in Browser its not working,on statusbar some tomes it display msg like class not found. But at some browsers it display applet started but don't display any component.
Any suggestions regarding this, so that IE and Netscape users can view.
Thanks in advance.
Yah, yah i'm a newbie!!

------------------
Haider Ali,
Adamsoft International
Paksitan Lhr.


Haider Ali,<BR>Adamsoft International<BR>Paksitan Lhr.
Manfred Leonhardt
Ranch Hand

Joined: Jan 09, 2001
Posts: 1492
Hi Haider,
In order to use Swing in browsers you need to use the java 2 sun plug-in. Browsers only support JDK1.1. This means that you will need to use different HTML tags than APPLET (i.e., OBJECT for IE and EMBED for Netscape). The following link explains it all very nicely.
<A HREF="http://java.sun.com/products/plugin/1.3/docs/tags.html" TARGET=_blank>http://java.sun.com/products/plugin/1.3/docs/tags.html</A>
Regards,
Manfred.
[This message has been edited by Manfred Leonhardt (edited September 21, 2001).]
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
You may also need the swingall.jar file in your classpath. See http://developer.java.sun.com/developer/onlineTraining/GUI/Swing1/Magercises/M2/help.html for instructions.
Lynn
Haider Ali
Greenhorn

Joined: Sep 21, 2001
Posts: 2
Thanks Manfred Leonhardt for reply,
Its working well,
There is another solution to this problem , Add this code. to ur html page.
<codebase="j2re1_3_0-win.exe#Version=1,3,0,0">
<PARAM NAME="code" VALUE="Test.class">
<PARAM NAME="codebase" VALUE=".">
<PARAM NAME="type" VALUE="application/x-java-applet;version=1.3">
<PARAM NAME="model" VALUE="models/HyaluronicAcid.xyz">
<PARAM NAME="scriptable" VALUE="true">
<COMMENT> <EMBED type="application/x-java-applet;version=1.3" width="780"
height="400" align="absbottom" code="Test.class"
>
</embed><codebase="." model="models/HyaluronicAcid.xyz"> pluginspage="http://java.sun.com/products/plugin/1.3/plugin-install.html">

------------------
Haider Ali,
Adamsoft International
Paksitan Lhr.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JApplet not working properly in Web browser
 
Similar Threads
JApplet within JInternalFrame...Please help
Making applet work with Swing!
Flickering in JApplet
REWARD : pass a2a parameter, involves using getCodeBase()
Java Applet Window?