Swing applets in a browser?

Hello I habve made a JApplet and I need it to work in a browser and not the AppletViewer.
How can i get this applet working in IE5?
Thanks!
LVL 1
dvd99Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

adam923Commented:
do you have the java plug-in for 1.2 applets?
0
dvd99Author Commented:
i have jdk1.2.1
0
adam923Commented:
post the html code you're using to launch the applet
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

dvd99Author Commented:
i can use <applet
code = applet.class
0
dvd99Author Commented:
i can use <applet
           code = applet.class
           height =  400
           width = 400
          >
          </applet>
I'm sure i need to add something :)

0
adam923Commented:
You need to use the java plugin for Java 1.2 (swing)
Here's the html to do it... replace applet.class with your class name in each place that it occurs

<!--"CONVERTED_APPLET"--><!-- CONVERTER VERSION 1.0 --><script LANGUAGE="JavaScript"><!--
    var _info = navigator.userAgent; var _ns = false;
    var _ie = (_info.indexOf("MSIE") > 0 && _info.indexOf("Win") > 0 && _info.indexOf("Windows 3.1") < 0);
//--></script>
<COMMENT><script LANGUAGE="JavaScript1.1"><!--
    var _ns = (navigator.appName.indexOf("Netscape") >= 0 && ((_info.indexOf("Win") > 0 && _info.indexOf("Win16") < 0 && java.lang.System.getProperty("os.version").indexOf("3.5") < 0) || (_info.indexOf("Sun") > 0) || (_info.indexOf("Linux") > 0)));
//--></script></COMMENT><script LANGUAGE="JavaScript"><!--
    if (_ie == true) document.writeln('<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" WIDTH = 600 HEIGHT = 630  codebase="http://java.sun.com/products/plugin/1.2/jinstall-12-win32.cab#Version=1,2,0,0"><NOEMBED><XMP>');
    else if (_ns == true) document.writeln('<EMBED type="application/x-java-applet;version=1.2" java_CODE = SimRabbit.java WIDTH = 600 HEIGHT = 630   pluginspage="http://java.sun.com/products/plugin/1.2/plugin-install.html"><NOEMBED><XMP>');
//--></script>
<applet CODE = applet.class WIDTH = 600 HEIGHT = 630 ><param NAME = CODE VALUE = applet.class ><param NAME="type" VALUE="application/x-java-applet;version=1.2"></applet></noembed></embed></object><!--
<APPLET  CODE = applet.class WIDTH = 600 HEIGHT = 630>
</APPLET>
--><!--"END_CONVERTED_APPLET"-->
0
agneskoCommented:
You can do this 2 things:
1./  Download JRE plugin
      http://java.sun.com/cgi-bin/plugin12-download.sh?
      (JApplet is not working for browser without plug-in)


2./  Download HTML_Converter
      http://java.sun.com/products/plugin/converter.html
      (this converter make some changes to the normal applet tag so as to activate the browser plug-in)

Hope this help.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.