DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Bo Shim Guest

    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
    help.



  2. #2
    Fabio Luis De Paoli Guest

    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:

    http://java.sun.com/products/plugin/1.3/docs/tags.html

    Have fun,

    Fabio

    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
    > help.


    Attached Files

  3. #3
    Join Date
    Mar 2008
    Posts
    2
    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>
    </applet>


    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!!!

  4. #4
    Join Date
    Mar 2008
    Posts
    2
    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...

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links