The following diagram illustrates the classes that combine to provide support for applications that can create user interface components simply in either an instance of JApplet, or an instance of JFrame. This allows essentially transparent coding for either applets or command-line applications.
The key interface is AppContext, which contains a union of the functionality of JApplet and JFrame. AppletContext and ApplicationContext implement AppContext and delegate methods that are appropriate to the JFrame or JApplet superclass. Those methods that don't make sense within a particular context (the icon image of an applet, for instance) are simply ignored.
AppContextDelegate provides a mechanism for customizing these contexts in a reasonable way. It delegates all the AppContext methods to one of the root contexts (either AppletContext or ApplicationContext). A subclass can then add additional functionality to customize the context. For example, the DesktopContext of MDIContext uses this mechanism to provide a Multiple Document style interface that is the same between applets and applications.
DesktopContext is capable of managing multiple view, each in its own internal frame. It uses a JPseudoFrame to implement maximization of the internal frames in a nicer way than the Swing JDesktopPane. When an internal frame is maximized, it does not just fill the desktop pane, but its content pane actually replaces the desktop pane. This is the way all real applications handle it. It also contains several other components laid out in a standard fashion: a menu bar, tool bar, a palette (on the left), a status bar, and the main display component. This layout is commonly used by drawing tools, such as Visio.
The classes JPalette and JStatusBar are not part of Swing, but are provided as components in the diva.gui.toolbox package.