javax.swing
Class JApplet

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Panel
              extended by java.applet.Applet
                  extended by javax.swing.JApplet
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer

public class JApplet
extends Applet
implements RootPaneContainer, Accessible

A top-level container that is usually used in web browsers.

See Also:
Serialized Form

Nested Class Summary
protected  class JApplet.AccessibleJApplet
          Provides accessibility support for JApplet.
 
Nested classes/interfaces inherited from class java.applet.Applet
Applet.AccessibleApplet
 
Nested classes/interfaces inherited from class java.awt.Panel
Panel.AccessibleAWTPanel
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
protected  AccessibleContext accessibleContext
          The accessible context for this JApplet.
protected  JRootPane rootPane
           
protected  boolean rootPaneCheckingEnabled
           
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
JApplet()
           
 
Method Summary
protected  void addImpl(Component comp, Object constraints, int index)
          This method is called by all the add() methods to perform the actual adding of the component.
protected  JRootPane createRootPane()
           
 AccessibleContext getAccessibleContext()
          Gets the AccessibleContext associated with this applet, creating one if necessary.
 Container getContentPane()
          getContentPane
 Component getGlassPane()
          getGlassPane
 JMenuBar getJMenuBar()
           
 JLayeredPane getLayeredPane()
          getLayeredPane
 Dimension getPreferredSize()
          Returns the preferred size of this container.
 JRootPane getRootPane()
          getRootPane
protected  boolean isRootPaneCheckingEnabled()
           
protected  String paramString()
          Returns a string representing the state of this container for debugging purposes.
protected  void processKeyEvent(KeyEvent e)
          Called when a key event is dispatched and component events are enabled.
 void remove(Component comp)
          Removes the specified component from this container.
 void setContentPane(Container contentPane)
          setContentPane
 void setGlassPane(Component glassPane)
          setGlassPane
 void setJMenuBar(JMenuBar menubar)
           
 void setLayeredPane(JLayeredPane layeredPane)
          setLayeredPane
 void setLayout(LayoutManager manager)
          Sets the layout manager for this container to the specified layout manager.
protected  void setRootPane(JRootPane root)
           
protected  void setRootPaneCheckingEnabled(boolean enabled)
           
 void update(Graphics g)
          Updates this container.
 
Methods inherited from class java.applet.Applet
destroy, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, init, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, start, stop
 
Methods inherited from class java.awt.Panel
addNotify
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, 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, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

accessibleContext

protected AccessibleContext accessibleContext
The accessible context for this JApplet.


rootPane

protected JRootPane rootPane

rootPaneCheckingEnabled

protected boolean rootPaneCheckingEnabled
Constructor Detail

JApplet

public JApplet()
Method Detail

getPreferredSize

public Dimension getPreferredSize()
Description copied from class: Container
Returns the preferred size of this container.

Overrides:
getPreferredSize in class Container
Returns:
The preferred size of this container.
See Also:
Component.getMinimumSize(), Component.setPreferredSize(Dimension), LayoutManager

setLayout

public void setLayout(LayoutManager manager)
Description copied from class: Container
Sets the layout manager for this container to the specified layout manager.

Overrides:
setLayout in class Container
Parameters:
manager - The new layout manager for this container.

setLayeredPane

public void setLayeredPane(JLayeredPane layeredPane)
Description copied from interface: RootPaneContainer
setLayeredPane

Specified by:
setLayeredPane in interface RootPaneContainer
Parameters:
layeredPane - TODO

getLayeredPane

public JLayeredPane getLayeredPane()
Description copied from interface: RootPaneContainer
getLayeredPane

Specified by:
getLayeredPane in interface RootPaneContainer

getRootPane

public JRootPane getRootPane()
Description copied from interface: RootPaneContainer
getRootPane

Specified by:
getRootPane in interface RootPaneContainer

setRootPane

protected void setRootPane(JRootPane root)

createRootPane

protected JRootPane createRootPane()

getContentPane

public Container getContentPane()
Description copied from interface: RootPaneContainer
getContentPane

Specified by:
getContentPane in interface RootPaneContainer

setContentPane

public void setContentPane(Container contentPane)
Description copied from interface: RootPaneContainer
setContentPane

Specified by:
setContentPane in interface RootPaneContainer
Parameters:
contentPane - TODO

getGlassPane

public Component getGlassPane()
Description copied from interface: RootPaneContainer
getGlassPane

Specified by:
getGlassPane in interface RootPaneContainer

setGlassPane

public void setGlassPane(Component glassPane)
Description copied from interface: RootPaneContainer
setGlassPane

Specified by:
setGlassPane in interface RootPaneContainer
Parameters:
glassPane - TODO

addImpl

protected void addImpl(Component comp,
                       Object constraints,
                       int index)
Description copied from class: Container
This method is called by all the add() methods to perform the actual adding of the component. Subclasses who wish to perform their own processing when a component is added should override this method. Any subclass doing this must call the superclass version of this method in order to ensure proper functioning of the container.

Overrides:
addImpl in class Container
Parameters:
comp - The component to be added.
constraints - The layout constraints for this component, or null if there are no constraints.
index - The index in the component list to insert this child at, or -1 to add at the end of the list.

getAccessibleContext

public AccessibleContext getAccessibleContext()
Description copied from class: Applet
Gets the AccessibleContext associated with this applet, creating one if necessary. This always returns an instance of Applet.AccessibleApplet.

Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class Applet
Returns:
the accessibility context of this applet

getJMenuBar

public JMenuBar getJMenuBar()

setJMenuBar

public void setJMenuBar(JMenuBar menubar)

paramString

protected String paramString()
Description copied from class: Container
Returns a string representing the state of this container for debugging purposes.

Overrides:
paramString in class Container
Returns:
A string representing the state of this container.

processKeyEvent

protected void processKeyEvent(KeyEvent e)
Description copied from class: Component
Called when a key event is dispatched and component events are enabled. This method passes the event along to any listeners that are attached.

Overrides:
processKeyEvent in class Component
Parameters:
e - the KeyEvent to process
See Also:
KeyListener, Component.addKeyListener(KeyListener), Component.enableEvents(long)

remove

public void remove(Component comp)
Description copied from class: Container
Removes the specified component from this container.

Overrides:
remove in class Container
Parameters:
comp - The component to remove from this container.

isRootPaneCheckingEnabled

protected boolean isRootPaneCheckingEnabled()

setRootPaneCheckingEnabled

protected void setRootPaneCheckingEnabled(boolean enabled)

update

public void update(Graphics g)
Description copied from class: Container
Updates this container. The implementation of this method in this class forwards to any lightweight components in this container. If this method is subclassed, this method should still be invoked as a superclass method so that lightweight components are properly drawn.

Overrides:
update in class Container
Parameters:
g - The graphics context for this update.
See Also:
Component.paint(Graphics), Component.repaint()