import java.awt.*;
import java.rmi.*;
public class HelloApplet extends java.applet.Applet {
    String message = "";
    public void init() {
        try {
            Hello obj = (Hello)
                Naming.lookup("rmi://" + getCodeBase().getHost() +
                                          "/HelloServer");
            message = obj.sayHello();
        } catch (Exception e) {}
    }
    public void paint(Graphics g) {
        g.drawString(message, 25, 50);
    }
}