FileDocCategorySizeDatePackage
MakeHTML.javaAPI DocExample1365Sun Dec 27 15:20:36 GMT 1998None

MakeHTML

public class MakeHTML extends Applet

Fields Summary
protected Button
goButton
Constructors Summary
Methods Summary
public booleanaction(java.awt.Event evt, java.lang.Object o)

		try {
			URL myNewURL = new URL("JavaScript", "", 0,
				"'<HTML><HEAD><TITLE>Testing!</TITLE></HEAD>" +
				"<BODY><P>Go to" +
				"<A HREF=\"http://www.darwinsys.com\"> " +
				"My Web Page</A>.</BODY></HTML>'" );

			// debug...
			System.out.println("URL = " + myNewURL);

			// "And then a miracle occurs..."
			getAppletContext().showDocument(myNewURL);

		} catch (Exception err) {
			System.err.println("Error!\n" + err);
			showStatus("Error, look in Java Console for details!");
		}
		return true;	// NOTREACHED
	
public voidinit()

		add(goButton = new Button("Go for it!"));