PDA

Click to See Complete Forum and Search --> : Can't Run Swing Applet in IE


cantene
Mar 15th, 2001, 08:30 AM
I face a strange problem in running my Calculator applet. Its GUI is written

in Swing, JDK 2 1.3 (i.e. class BinaryCalculator extends JApplet ...). It can
run
using appletviewer and my home Netscape 6. But can't run in IE and school
Netscape
(I think is 4.x). I have tried updating my IE to 5.5 but still can't run. The
error message in the IE status bar is:

load: Class BinaryCalculator not found

I have also tested the Hello World Swing Applet. The same fate.

My HTML code is just simple as follows:

<HTML>
<HEAD>
<TITLE>Binary Calculator</TITLE>
</HEAD>
<BODY>
<aPPLET CODE="BinaryCalculator.class" WIDTH=299
HEIGHT=329></APPLET>
</BODY>
</HTML>

Or

<HTML>
<HEAD>
<TITLE>Binary Calculator</TITLE>
</HEAD>
<BODY>
<aPPLET CODE="BinaryCalculator" WIDTH=299
HEIGHT=329></APPLET>
</BODY>
</HTML>

and the HTML file and the class file are put in the same folder.

Do you know what has happened and how can I solve the problem? Is it I need to
embed the applet as an object using the <OBJECT> tag in the HTML for
running Swing
applet properly in Microsoft world. I would be most grateful if you have time to

reply. Thanks a lot.

IceSoft
Mar 15th, 2001, 11:50 AM
I am not sure but try using Html converter found at
http://java.sun.com/products/plugin/1.3/converter.html

I hope this help

Mar 15th, 2001, 01:52 PM
See http://forums.vb-world.net/showthread.php?s=&threadid=60522

billrogers
Mar 19th, 2001, 02:41 PM
this might something you already know or not, but swing is not supported by the most popular browsers i.e. Internet Explorer and Netscape. You have do run the html converter on your html file and also force the user to download the java run time environment, its all documented at sun.

Sorry if you already knew that...

Mar 19th, 2001, 09:12 PM
Hey billrogers,
Could you post a link on that issue? I was recently having problems with IE with a non-swing applet at the end of thread http://forums.vb-world.net/showthread.php?s=&threadid=60522 . I posted the versions I used there and I was surprised that only Netscape's worked. I don't recall having this problem before (although it's possible I favored Netscape at the time I dabbled with applets and lately I've been favoring IE and have not been using applets much). Thanks.

billrogers
Mar 21st, 2001, 10:42 AM
http://java.sun.com/docs/books/tutorial/uiswing/start/swingApplet.html

Mar 21st, 2001, 05:17 PM
Thanks.