Class awt.Frame
All Packages    This Package    Previous    Next

Class awt.Frame

java.lang.Object
   |
   +----awt.Component
           |
           +----awt.Container
                   |
                   +----awt.Frame

public class Frame
extends Container
A Frame is a top-level window that can contain other windows.
Version:
1.39 20 Mar 1995
Author:
Sami Shaio

background
defaultFont
statusMessage

Frame(WServer, boolean, boolean, Frame, int, int, Color)
Constructs a Frame.
Frame(WServer, boolean, Frame, int, int, Color)
Creates a modeless Frame.
Frame(boolean, int, int, Color)
Constructs a Frame.

dispose()
Disposes of this Frame.
getPreferredSize()
Returns the preferred dimension of this frame.
handleQuit()
Override this method to take some action when the user decides to destroy this Frame.
hasStatusBar()
map()
Shows this Frame.
minDimension()
Returns the minimum dimension to hold this Frame.
move(int, int)
Moves this Frame.
reshape(int, int, int, int)
Reshapes this Frame to the given dimensions.
resize()
Called to inform the Frame that its size has changed and it should layout its children.
setDefaultFont(Font)
Sets the default font to use for all gui elements contained in this Frame.
setIconImage(Image)
Set the image to display when this Frame is iconized.
setMinSize(int, int)
Set the minimum size of the window
setMinSize()
Sets the minimum size that this frame can be resized to and still show all its children.
setStatusMessage(String)
setTitle(String)
Sets the title of this frame.
showStatusBar(boolean)
showingStatusBar()
unMap()
Hides this Frame.

defaultFont
  public Font defaultFont
background
  public Color background
statusMessage
  public String statusMessage

Frame
  public Frame(WServer ws,
               boolean hasTitleBar,
               boolean isModal,
               Frame parentFrame,
               int w,
               int h,
               Color bg)
Constructs a Frame.
Parameters:
ws - is the WServer to create this Frame.
hasTitleBar - is true if this Frame should have a title region.
isModal - specifies whether the Frame is modal or not. If it is modal, then Frame.map will block until the frame is unmapped.
parentFrame - if not null then this Frame will be attached to the given Frame and serve the function of a dialog window.
w - is the width of this Frame.
h - is the height of this Frame.
bg - is the background color of this Frame.

Frame

  public Frame(WServer ws,
               boolean hasTitleBar,
               Frame parentFrame,
               int w,
               int h,
               Color bg)
Creates a modeless Frame.

Frame

  public Frame(boolean hasTitleBar,
               int w,
               int h,
               Color bg)
Constructs a Frame. Unlike the previous constructor, this does not have a "parent" parameter. It uses a default parent parameter that is the first Frame ever created. In general, this is a bad constructor to call, but unfortunatly there are occasionally situations where Frames need to be created, but finding an appropriate parent is impossible.
Parameters:
hasTitleBar - is true if this Frame should have a title region.
w - is the width of this Frame.
h - is the height of this Frame.
bg - is the background color of this Frame.

setDefaultFont
  public synchronized void setDefaultFont(Font f)
Sets the default font to use for all gui elements contained in this Frame.

resize

  public synchronized void resize()
Called to inform the Frame that its size has changed and it should layout its children.

getPreferredSize

  public Dimension getPreferredSize()
Returns the preferred dimension of this frame.
Overrides:
getPreferredSize in class Container

minDimension

  public Dimension minDimension()
Returns the minimum dimension to hold this Frame.
Overrides:
minDimension in class Container

map

  public void map()
Shows this Frame.
Overrides:
map in class Container

unMap

  public void unMap()
Hides this Frame.
Overrides:
unMap in class Container

setTitle

  public void setTitle(String title)
Sets the title of this frame.

dispose

  public void dispose()
Disposes of this Frame.
Overrides:
dispose in class Container

handleQuit

  public void handleQuit()
Override this method to take some action when the user decides to destroy this Frame.

move

  public void move(int newX,
                   int newY)
Moves this Frame. UNIMPLEMENTED
Overrides:
move in class Container

setMinSize

  public void setMinSize(int pWidth,
                         int pHeight)
Set the minimum size of the window

setMinSize

  public void setMinSize()
Sets the minimum size that this frame can be resized to and still show all its children.

reshape

  public void reshape(int x,
                      int y,
                      int w,
                      int h)
Reshapes this Frame to the given dimensions.
Overrides:
reshape in class Component

showStatusBar

  public void showStatusBar(boolean show)
showingStatusBar
  public boolean showingStatusBar()
setStatusMessage
  public void setStatusMessage(String message)
setIconImage
  public void setIconImage(Image image)
Set the image to display when this Frame is iconized. Note that not all platforms support the concept of iconizing a window.

hasStatusBar

  public boolean hasStatusBar()

All Packages    This Package    Previous    Next