The Java Plug-In uses the built-in Java security model, so it uses your key store for certificates and your .java.policy file to establish the security policy.
Back in Chapter 36, "Java Security Features," you saw how to create a private key and a certificate and then use the two to sign a JAR file. You use the same procedure when you want to sign applet code. Just package the applet code into a JAR file and sign the JAR.
Listing 45.1 shows an example applet that reads a file called journal from your home directory (what Java calls user.home). You edit the file using the TextArea displayed on the screen and click the Save button at the bottom to save the text.