I packed the project in a jar that is an applet and I want this applet to run here in the linux old firefox browser, however, it asks to select a main method, but the applet has no main method. How to make it run?
packagexxx;importjava.applet.Applet;importjava.awt.event.ActionListener;importjava.awt.event.ActionEvent;importjava.awt.Button;importjava.awt.Graphics;//importnetscape.javascript.JSObject;publicclassTesteAppletextendsApplet{publicStringconteudo="";
public String formulario;
public String campo;
//public JSObject campoDoFormularioHTML;
//
public void init() {
formulario = getParameter("formulario");
campo = getParameter("campo");
ActionListener trataEventos = new ActionListener(){
public void actionPerformed(java.awt.event.ActionEvent e){
conteudo += e.getActionCommand();
// campoDoFormularioHTML.setMember("value", "" + conteudo);
}
};
Button b7 = new Button("7");
this.add(b7);
b7.addActionListener(trataEventos);
System.out.println();
Button b8 = new Button("8");
this.add(b8);
b8.addActionListener(trataEventos);
Button b9 = new Button("9");
this.add(b9);
b9.addActionListener(trataEventos);
Button b4 = new Button("4");
this.add(b4);
b4.addActionListener(trataEventos);
Button b5 = new Button("5");
this.add(b5);
b5.addActionListener(trataEventos);
Button b6 = new Button("6");
this.add(b6);
b6.addActionListener(trataEventos);
Button b1 = new Button("1");
this.add(b1);
b1.addActionListener(trataEventos);
Button b2 = new Button("2");
this.add(b2);
b2.addActionListener(trataEventos);
Button b3 = new Button("3");
add(b3);
b3.addActionListener(trataEventos);
Button b0 = new Button("0");
this.add(b0);
b0.addActionListener(trataEventos);
Button limpa = new Button("Limpa");
this.add(limpa);
limpa = new Button();
// limpa.addActionListener(new ActionListener() {
//
// public void actionPerformed(java.awt.event.ActionEvent e) {
// conteudo = "";
// campoDoFormularioHTML.setMember("VALUE", conteudo);
// }
// });
//
// JSObject objWin = JSObject.getWindow(this);
// JSObject objDoc = (JSObject) objWin.getMember("document");
// JSObject objForms = (JSObject) objDoc.getMember("forms");
// JSObject objForm = (JSObject) objForms.getMember("formulario");
// JSObject objElements = (JSObject) objForms.getMember("elements");
// campoDoFormularioHTML = (JSObject) objElements.getMember(campo);
// campoDoFormularioHTML.setMember("value", "");
}
}