java.awt
Class Window

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
All Implemented Interfaces:
java.awt.image.ImageObserver
Direct Known Subclasses:
Dialog, Frame

public class Window
extends Container

A Window is a top-level window with no borders and no menubar. It could be used to implement a pop-up menu. The default layout for a window is BorderLayout.


Field Summary
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
Window(Frame parent)
          Constructs a new Window initialized to an invisible state.
 
Method Summary
 void addNotify()
          Creates the Window's peer.
 void dispose()
          Disposes of the Window.
 Toolkit getToolkit()
          Returns the toolkit of this frame.
 String getWarningString()
          Gets the warning string for this window.
 void pack()
          Packs the components of the Window.
 void show()
          Shows the Window.
 void toBack()
          Sends the frame to the back of the Window.
 void toFront()
          Brings the frame to the front of the Window.
 
Methods inherited from class java.awt.Container
add, add, add, countComponents, deliverEvent, getComponent, getComponents, getLayout, insets, layout, list, locate, minimumSize, paintComponents, paramString, preferredSize, printComponents, remove, removeAll, removeNotify, setLayout, validate
 
Methods inherited from class java.awt.Component
action, bounds, checkImage, checkImage, createImage, createImage, disable, enable, enable, getBackground, getColorModel, getFont, getFontMetrics, getForeground, getGraphics, getParent, getPeer, gotFocus, handleEvent, hide, imageUpdate, inside, invalidate, isEnabled, isShowing, isValid, isVisible, keyDown, keyUp, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent, prepareImage, prepareImage, print, printAll, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setFont, setForeground, show, size, toString, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Window

public Window(Frame parent)
Constructs a new Window initialized to an invisible state. It behaves as a modal dialog in that it will block input to other windows when shown.

Parameters:
parent - the owner of the dialog
See Also:
Component.resize(int, int), show()
Method Detail

addNotify

public void addNotify()
Creates the Window's peer. The peer allows us to modify the appearance of the Window without changing its functionality.

Overrides:
addNotify in class Container
See Also:
Container.removeNotify()

pack

public void pack()
Packs the components of the Window.


show

public void show()
Shows the Window. This will bring the window to the front if the window is already visible.

Overrides:
show in class Component
See Also:
Component.hide()

dispose

public void dispose()
Disposes of the Window. This method must be called to release the resources that are used for the window.


toFront

public void toFront()
Brings the frame to the front of the Window.


toBack

public void toBack()
Sends the frame to the back of the Window.


getToolkit

public Toolkit getToolkit()
Returns the toolkit of this frame.

Overrides:
getToolkit in class Component
See Also:
Toolkit

getWarningString

public final String getWarningString()
Gets the warning string for this window. This is a string that will be displayed somewhere in the visible area of windows that are not secure.