import java.applet.Applet;
import java.awt.*;
import java.net.*;

/** Taken from Core Web Programming from 
 *  Prentice Hall and Sun Microsystems Press,
 *  http://www.corewebprogramming.com/.
 *  &copy; 2001 Marty Hall and Larry Brown;
 *  may be freely used or adapted.
 */

public class GetHost extends Applet {
  private String host;
  
  public void init() {
    setBackground(Color.white);
    try {
      host = InetAddress.getLocalHost().toString();
    } catch(UnknownHostException uhe) {
      host = "Unknown Host";
    }
  }
  
  public String getHost() {
    return(host);
  }
}
