Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JApplet not working properly in Web browser

 
Haider Ali
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic