I've never seen this kind of code structure in the instance, what does it do? The ActionListener class to instantiate it needs to be put like this:
ActionListener trataEventos = new ActionListener(){
public void actionPerformed(java.awt.event.ActionEvent e){
conteudo += e.getActionCommand();
campoDoFormularioHTML.setMember("value", "" + conteudo);
}
};
It's similar to doing as a method, why do you need to do this? Create the instance this way?
It follows:
public class Teclado extends Applet{
public String conteudo = "";
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);
}
};