Now let's look at the differences when writing an RMI client as an applet rather than as a standalone application. There are three basic differences:
1. You typically code the RMI initialization in the applet's "init" method rather than in "main"
2. Since you cannot change the method signature of init (you are overriding it from Applet), you cannot code "init" as throwing exceptions. Thus you must handle exceptions with try-catch blocks
3. You don't have to install the RMI security manager, since applets automatically use the AppletSecurityManager, which allows downloading of remote classes
Despite these changes, the RMI-related code in an applet client is basically the same as in an application. You still use the RMI naming registry to find remote references, cast the returned reference to the correct type, and so forth.
One other difference between applets and applications -- to use an applet from within a browser, you need to write an HTML page that references the applet. Let's look at that next.