import java.applet.Applet;
import java.awt.Graphics;
import java.io.*;
import java.net.*;

/**
 *		A really simple example of an applet which has a string that can be set
 *		using live connect (or anything I guess) or alternatively set to the
 *		contents of a relative URL.
 */
public class CallApplet extends Applet {

	private String myString;

	public void init() {
		try { 
			System.out.println("Doc base : "+getDocumentBase());
		} catch(Exception e) {
			System.err.println("EX-1");
			e.printStackTrace();
		}
		try { 
			System.out.println("Calling: "+getParameter("url")+":"+getParameter("target"));
		} catch(Exception e) {
			System.err.println("EX-2");
			e.printStackTrace();
		}
		try { 
			System.out.println("doc base "+getDocumentBase());
			System.out.println("code base "+getCodeBase());
		} catch(Exception e) {
			System.err.println("EX-3");
			e.printStackTrace();
		}
		try { 
			if(TargetURLApplet.app!=null)TargetURLApplet.app.targetURL(getParameter("url"),getParameter("target"));
			else System.out.println("NO APPLET");
		} catch(Exception e) {
			System.err.println("EX-4");
			e.printStackTrace();
		}
	}

}


