Initialize the Applet
setBackground(Color.gray);
try {
targetURL = new URL(targetString);
} catch (MalformedURLException mfu) {
throw new IllegalArgumentException(
"ShowDocApplet got bad URL " + targetString);
}
Button b = new Button("View Secret");
add(b);
b.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
getAppletContext().showDocument(targetURL);
}
});