Andreas Rozek Hints for Reading List of Recent Changes Guestbook Entry Contact the Author  Deutsche Version  HomePage Previous Topic Next Topic  First Page of Current Topic Next Page Previous Page

Applet_06

An applet's display is not restricted to a fixed area within the enclosing web document - the applet may additionally open any number of windows which will pop up outside the window of the web browser. For security reasons, however, these windows are marked as belonging to an applet in order to warn the user that it might be unsafe to enter sensible information into such a window.

"Applet_06" demonstrates this feature by opening an external window with a display which reflects the internal state of the applet. (Please note that some browsers seem to "unload" applets as soon as the corresponding web page is no longer the topmost one in its browser window. With such a browser, the external display will always show the same state only - in that case, just download the source code (and any additional image files), compile it locally and run the applet using Sun's "appletviewer").

Please, also consider my "Hints for Reading" and the "List of Recent Changes"!

Applet_06 snapshot

Click the button on the left side to open an external window with a display of the applet's internal state.

External Frames and Dialogs

Principally, there is no difference between applets and stand-alone applications regarding the creation of external frames and dialogs:

  Frame externalFrame = new Frame();
  externalFrame.setVisible(true);

Any additional "decoration" (because of the window's origin in an applet) will be added by the run-time environment (i.e. by the Browser's implementation of Java).

Source Code

The source code of this applet is available for download:

Additionally, the following image files are required to run "Applet_06":

Disclaimer

Please, consider also the author's Disclaimer!

http://www.Andreas-Rozek.de/Java/JavaKurs/Applet_06/Applet_06.html    (last Modification: 01.05.2002)