Applets have a security model that prevents the Java code from performing unsafe actions. The Security Restrictions page of the Java tutorial describes these restrictions.
Most of the Ptolemy II demonstrations were written as Java plug-in 1.4 applets. These applets use the Java Plug-in, which runs under both Netscape Communicator and Microsoft Internet Explorer. See the Plug-in section of the Ptolemy II Troubleshooting guide for details.
Problem: All your examples are of applets. How do I apply them to applications?(The AWT Java Tutorial page is no longer on the web, it was replaced by the Swing Java Tutorial page)
Except where noted, anywhere in this trail that you see a subclass of the Applet class, you can substitute a subclass of the Panel class or, if the subclass isn't used as a container, a subclass of the Canvas class. In general, it's easy to convert an applet into an application, as long as the applet doesn't rely on any special applet abilities (such as using methods defined in the Applet class).
To convert an applet into an application, you need to add a main() method that creates an instance of a Frame subclass, creates an instance of the Applet (or Panel or Canvas) subclass, adds the instance to the Frame, and then calls the init() and start() methods of the instance. The Frame subclass should have a handleEvent() implementation that handles WINDOW_DESTROY events in the appropriate way.
See AnimatorApplet.java and AnimatorApplication.java for examples of an applet and an application that implement the same functionality.
Last Updated: $Date: 2014-09-24 07:50:41 -0700 (Wed, 24 Sep 2014) $