Applications and Applets:
Embedded Applets

Embedding

Java applets can embed any type of content and many program authors use the Sun Applet API to create attractive applets that rival the functionality of Java applications.  Each applet is unique and these applets are embedded into html pages using the applet tag.  The OSP library can, of course, be used to write stand Java applets.

An alternative approach is to create a generic applet that creates (instantiates) the windows and resources needed to mimic a Java application.  The advantage of this approach is that the program author creates only one version of a program and need not concern him/herself with the Applet API.  That is, the same code runs as a stand-alone application, as a Web Start application, and as an applet.

ApplicationApplet displays a button within a web page and clicking this button creates (instantiates) a program.  This applet is useful when the program was designed to be run as a Java application with multiple windows.  ApplicationApplet creates an environment that approximates, albeit with security restrictions, the look and feel of a Java application. 

Frames Applet

FramesApplet allows an html author to embed a window from a into an html page.  If a program creates multiple windows, the applet chooses the embedded content as follows:

Because many applications create only a single window, the second option makes possible to embed standard Java program without additional programming.

[The FramesApplet shown here is under development.  The previous version of this applet was called WrapperApplet.  WrapperApplet used a similar paradigm but his applet is not supported and has not been released.]