Como criar om objeto de uma classe através de uma applet

0 respostas
W

Estou construindo uma applet que cria um objeto de uma classe que tenho no mesmo pacote, porém qdo vou executar a applet com meu código html, me ocorre o seguinte erro:java.lang.NoSuchMethodError: myPacket.FramePrincipal.(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

Alguém pode me ajudar?
Estou postando meus códigos pra ficar mais fácil de entender:

HTML:

CarregaApplet ===================================================================================== [u][b]Applet:[/b][/u] public class Applet extends JApplet { FramePrincipal f; public Applet() { } private void jbInit() throws Exception { this.getContentPane().setLayout( null ); f = new FramePrincipal("param1","param2","param3"); f.setVisible(true); } public void init() { try { jbInit(); } catch (Exception e) { e.printStackTrace(); } } public void start() { }

public void stop() {
}
public void destroy() {
}
static {
try {
} catch (Exception e) {
}
}
}

Cod myClass Example:

public class FramePrincipal extends JFrame {

private String login = null;

private String senha = null;

private String tipo = null;

public FramePrincipal(String login, String senha, String tipo) {

try {

setUsuario(login,senha,tipo);

jbInit();

this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

} catch (Exception e) {

e.printStackTrace();

}

}

}

Agradeço todas as respostas!

Criado 23 de janeiro de 2008
Respostas 0
Participantes 1