Running Swing Applet in html page
I am trying to run Swing Applet in an HTML page with "<APPLET CODE= myApplet.class></APPLET>.
However my browser is not able to find the applet. I would appreciate any
Re: Running Swing Applet in html page
Unfortunately Swing is not included in the standard Java browsers carry. You need to install
Sun's Java plug-in to enable browser to run Swing applets. You also need to change your HTML
page to request the plug-in. It is not difficult - precise info can be found at:
Bo Shim wrote:
> I am trying to run Swing Applet in an HTML page with "<APPLET CODE= myApplet.class></APPLET>.
> However my browser is not able to find the applet. I would appreciate any
also u mite wanna check out if ur class is inside a package. for example, if ur applet MyApplet is inside a package, say, AppPackage, then try the following code in the HTML:
<applet code=AppPackage.MyApplet height=300 width=300>
and this HTML should be above ur package directory.
package is nothing but a folder (directory) inside which ur class will reside. So come out of that folder and put ur HTML there. and run it. MyApple.class is i believe, reduntant. "MyApplet" will work just fine.
all the best!!!
besides... ur browser may have blocked the applet saying its a dangerous content...if that happens check the top part of ur browser...a yellow band will appear where if u click, u can enable the block content...
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center