Make your own free website on

Class appWrapper


public class appWrapper
extends java.applet.Applet
implements java.applet.AppletStub, java.lang.Runnable

The appWrapper is thought to make the applet itself independent from the original context. This is necessary to be able to detach the applet from the web browsers window without disconnecting it from events. Note: This applet should work with any applet without changes.

<PARAM NAME="applet" VALUE="applet">
Defines the applet to be loaded by the appWrapper. State the applet class name without ".class"!

<PARAM NAME="startButton" VALUE="text">
If this parameter is set the applet is not loaded until the user presses the button. This decreases first time download delay. The text given as value to the parameter is shown on the button. While loading the applet the message "Loading ..." is shown on the button.

<PARAM NAME="stopButton" VALUE="text">
This parameter defines the button text when the applet is loaded. When pressing the button while the applet is running this causes the applet window to be destroyed and the applet is stopped.

<PARAM NAME="frameTitle" VALUE="text">
The frameTitle is the text that is shown in the title bar of the applet window.

$Id:,v 1.9 1997/07/24 13:26:24 leo Exp $
Matthias L. Jugel
See Also:
Serialized Form

Fields inherited from class java.awt.Component
Constructor Summary
Method Summary
 void appletResize(int width, int height)
          This method is called when the applet want's to be resized.
 java.lang.String getAppletInfo()
          Give information about the applet.
 java.lang.String[][] getParameterInfo()
          Give information about the appWrapper and the applet loaded.
 boolean handleEvent(java.awt.Event evt)
          Handle button events.
 void init()
          Applet initialization.
 void paint(java.awt.Graphics g)
          Write a message to the applet area.
 void reshape(int x, int y, int w, int h)
          reshape the applet and ourself
 void run()
          Load the applet finally.
Methods inherited from class java.applet.Applet
destroy, getAppletContext, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, start, stop
Methods inherited from class java.awt.Panel
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFont, setLayout, update, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail


public appWrapper()
Method Detail


public void init()
Applet initialization. We load the class giving in parameter "applet" and set the stub corresponding to ours. Thus we are able to give it access to the parameters and any applet specific context.
init in class java.applet.Applet


public void run()
Load the applet finally. When using a button this creates a new frame to put the applet in.
Specified by:
run in interface java.lang.Runnable


public void appletResize(int width,
                         int height)
This method is called when the applet want's to be resized.
Specified by:
appletResize in interface java.applet.AppletStub
width - the width of the applet
height - the height of the applet


public java.lang.String getAppletInfo()
Give information about the applet.
getAppletInfo in class java.applet.Applet


public java.lang.String[][] getParameterInfo()
Give information about the appWrapper and the applet loaded.
getParameterInfo in class java.applet.Applet


public void paint(java.awt.Graphics g)
Write a message to the applet area.
paint in class java.awt.Container


public void reshape(int x,
                    int y,
                    int w,
                    int h)
reshape the applet and ourself
reshape in class java.awt.Component


public boolean handleEvent(java.awt.Event evt)
Handle button events. When pressed it either creates the new applet window or destoys it.
handleEvent in class java.awt.Component