How to embed java swing applet into website?

I am trying to implement a swing applet on our website, but it does not work. I was able to get applets that use awt for graphics. The web page containing the applet shows only the empty box that my applet should contain, even there are no error messages. My applet works fine in netbeans. An applet should display several buttons and a text box. I really don't know what is going on.

The web page is located at http://nuevawave.org/sandbox/JavaGallery/GUIApplet.html The applet is located 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> 
+4
source share
2 answers

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

If java works from your "command line" or terminal. I could say that the plugin for your browser is not installed. I would recommend you reinstall JDK or JRE and don't forget to install the browser plugin.

+3
source

You can use the <object> tag instead. To find out how to use this, set the link

+1
source

Source: https://habr.com/ru/post/1369559/


All Articles