そのため、課題のために小さな Java アプレットを作成し、それを Web ページに表示する必要がありました。NetBeans では問題なくビルドできますが、Web ページで実行しようとすると、次のように灰色で表示されます。
import java.awt.GridBagConstraints;
import java.lang.reflect.InvocationTargetException;
import javax.swing.JButton;
import javax.swing.JTextArea;
public class PlanZajecJavaProjektApplet extends javax.swing.JApplet {
/**
* Initializes the applet PlanZajecJavaProjektApplet
*/
public static int licznikTextFields = 0;
int dzienLekcji;
int godzinaLekcji;
int ileGodzinLekcji;
private GridBagConstraints gridBagConstraints;
private JButton button;
@Override
public void init() {
try {
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException | javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(PlanZajecJavaProjektApplet.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
//</editor-fold>
/* Create and display the applet */
try {
java.awt.EventQueue.invokeAndWait(new Runnable() {
@Override
public void run() {
initComponents();
}
});
} catch (InterruptedException | InvocationTargetException ex) {
}
}
/**
* This method is called from within the init() method to initialize the
* form. WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
では、何が間違っているのでしょうか?