My JApplet is producing a error when DrawOvalInputs.html runs and calls the class file of DrawOvalInputs. So far, I have only been able to get it work as an actual application
you must call it with the right path
if your path is like
DrawOvalApplet\build\classes\drawovalapplet\DrawOvalInputs.class
and your .html is in
DrawOvalApplet\build\DrawOvalInputs.html
call it
...
<applet code=classes.drawovalapplet.DrawOvalInputs.class width=400 height=400>
</applet>
...
much better your .html is in
DrawOvalApplet\build\classes\DrawOvalInputs.html
call it
...
<applet code=drawovalapplet.DrawOvalInputs.class width=400 height=400>
</applet>
...
result :
applet running
You can call htmlconverter
and let do it for you
java -jar htmlconverter.jar -gui
Result DrawOvalInputs.html
<html>
<body>
<!--"CONVERTED_APPLET"-->
<!-- HTML CONVERTER -->
<object
classid = "clsid:CAFEEFAC-0017-0000-0051-ABCDEFFEDCBA"
codebase = "http://java.sun.com/update/1.7.0/jinstall-7u51-windows-i586.cab#Version=7,0,510,13"
WIDTH = 400 HEIGHT = 400 >
<PARAM NAME = CODE VALUE = drawovalapplet.DrawOvalInputs.class >
<param name = "type" value = "application/x-java-applet;jpi-version=1.7.0_51">
<param name = "scriptable" value = "false">
<comment>
<embed
type = "application/x-java-applet;jpi-version=1.7.0_51" \
CODE = drawovalapplet.DrawOvalInputs.class \
WIDTH = 400 \
HEIGHT = 400
scriptable = false
pluginspage = "http://java.sun.com/products/plugin/index.html#download">
<noembed>
</noembed>
</embed>
</comment>
</object>
<!--
<APPLET CODE = drawovalapplet.DrawOvalInputs.class WIDTH = 400 HEIGHT = 400>
</APPLET>
-->
<!--"END_CONVERTED_APPLET"-->
</body>
</html>
Use the class file and the actual file path and name. For example:
<applet code=DrawOvalInputs.class width=400 height=400>
</applet>
if the class file is located in the same folder as your HTML file.