Boa tarde
Estou estudando java e estou tentando exibir um applet em um html, quando executo o html ele carrega a página mas deixa apenas um quadrado cinza no lugar que deve aparecer o applet e trava o navegador, esse é meu código, estou usando netbenas e deixei o html no src junto ao arquivo FirstApplet.java:
Java:
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package unidade2.aula1;
import java.awt.*;
import java.applet.Applet;
/**
*
* @author alexandre
*/
public class FirstApplet extends Applet {
Button button1, button2, button3;
public void init() {
button1 = new Button("Ok");
button2 = new Button("Open");
button3 = new Button("Close");
add(button1);
add(button2);
add(button3);
}
}
Esse é o html:
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<h1>Teste</h1>
<hr>
<applet code=FirstApplet.class width=300 height=120>
</applet>
<hr>
<a href="GraphApplet.java">The source</a>.
</body>
</html>
Onde estou errando?