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?
 
agneskoConnect With a Mentor Commented:
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
 
adam923Commented:
do you have the java plug-in for 1.2 applets?
0
 
dvd99Author Commented:
i have jdk1.2.1
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
adam923Commented:
post the html code you're using to launch the applet
0
 
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
All Courses

From novice to tech pro — start learning today.