4

I am trying to embed a swing applet into our website, but it is not working. I have been able to get applets that use awt to do graphics to work. The web page that contains the applet only shows a blank box that should contain my applet, there aren't even any error messages. My applet works fine in netbeans. The applet is supposed to show a few buttons and a text field. I really don't know whats going on.

The web page is located at http://nuevawave.org/sandbox/JavaGallery/GUIApplet.html The applet is at http://nuevawave.org/sandbox/JavaGallery/TestApplet.jar

Here is the html:

    <html>
       <head>
          <title>Test Page</title>
          <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
       </head>
       <body>
           <applet Archive ="TestApplet.jar, swing-layout-1.0.4.jar"
                  Code="test.GUIApplet"
                  WIDTH="250" HEIGHT="300" >
           </applet>

       </body>
   </html>
3
  • 1
    Works for me! :) (btw arhive attribute should be a comma separated list and you have a ` ` (space) there also) Commented Aug 29, 2011 at 20:06
  • wow, it works for you? Something must be up with my browser. Commented Aug 29, 2011 at 20:46
  • 1
    2 buttons and a text field, right? Works fine in IE, blank page in FF. But then, my FF on this Win 7 based Netbook is failing for all applets at the moment. :( BTW - with the HTML, and a link to the live page and Jar - excellent question. +1 Commented Aug 30, 2011 at 0:57

2 Answers 2

3

as I wrote in the comments it works for me (I'm using OpenJDK 1.6.0_22, Linux (ubuntu) and Firefox).

If java works from your "command line" or terminal. I could be that the plugin for your browser isn't installed. I would recommend you reinstalling the JDK or JRE and remember to install the plugin for the browser aswell.

Sign up to request clarification or add additional context in comments.

1 Comment

I found that it doesn't work from my mac, but does from a pc.
1

You can use the <object> tag instead. To know how to use this, check this link

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.