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

// This appears in Core Web Programming from
// Prentice Hall Publishers, and may be freely used
// or adapted. 1997 Marty Hall, hall@apl.jhu.edu.

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);
  }
}

