A� vai um exemplo escrito as pressas, para maiores informa��es veja o m�todo
Applet.getAppletContext () e a class AppletContext
public class MyApplet extends Applet {
public void init () {
text = new JTextField (40);
b = new JButton ("Open Url");
b.addActionListener (new ActionListener () {
public void actionPerformed (ActionEvent e) {
try {
URL url = new URL (text.getText ());
getAppletContext ().ShowDocument (url, "_blank");
}
catch (Exception e) {
text.setText (e.getMessage ());
}
}
});
}
private JButton b;
private JTextField text;
}
Ricardo Munhoz Santiago
Sun Certified Programmer for the Java 2 platform
Come and get some !!!
--------------------------- LISTA SOUJAVA ---------------------------
http://www.soujava.org.br - Sociedade de Usu�rios Java da Sucesu-SP
[para sair da lista: http://www.soujava.org.br/forum/cadastrados.htm]
---------------------------------------------------------------------