java.awt
Class Frame
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--java.awt.Window
|
+--java.awt.Frame
All Implemented Interfaces:
MenuContainer, ImageObserver, MenuContainer, Serializable
This class is a top-level window with a title bar and window
decorations.
Author:- Aaron M. Renn (arenn@urbanophile.com)
CROSSHAIR_CURSOR
public static final int CROSSHAIR_CURSOR
Constant for a cross-hair cursor.
DEFAULT_CURSOR
public static final int DEFAULT_CURSOR
Constant for the default cursor.
Deprecated. replaced by Cursor.DEFAULT_CURSOR
instead.
E_RESIZE_CURSOR
public static final int E_RESIZE_CURSOR
Cursor used over E edge of window decorations.
HAND_CURSOR
public static final int HAND_CURSOR
Constant for a hand cursor.
ICONIFIED
public static final int ICONIFIED
MAXIMIZED_BOTH
public static final int MAXIMIZED_BOTH
MAXIMIZED_HORIZ
public static final int MAXIMIZED_HORIZ
MAXIMIZED_VERT
public static final int MAXIMIZED_VERT
MOVE_CURSOR
public static final int MOVE_CURSOR
Constant for a cursor used during window move operations.
NE_RESIZE_CURSOR
public static final int NE_RESIZE_CURSOR
Cursor used over NE corner of window decorations.
NORMAL
public static final int NORMAL
NW_RESIZE_CURSOR
public static final int NW_RESIZE_CURSOR
Cursor used over NW corner of window decorations.
N_RESIZE_CURSOR
public static final int N_RESIZE_CURSOR
Cursor used over N edge of window decorations.
SE_RESIZE_CURSOR
public static final int SE_RESIZE_CURSOR
Cursor used over SE corner of window decorations.
SW_RESIZE_CURSOR
public static final int SW_RESIZE_CURSOR
Cursor used over SW corner of window decorations.
S_RESIZE_CURSOR
public static final int S_RESIZE_CURSOR
Cursor used over S edge of window decorations.
TEXT_CURSOR
public static final int TEXT_CURSOR
Constant for a cursor over a text field.
WAIT_CURSOR
public static final int WAIT_CURSOR
Constant for a cursor to display while waiting for an action to complete.
W_RESIZE_CURSOR
public static final int W_RESIZE_CURSOR
Cursor used over W edge of window decorations.
Frame
public Frame()
Initializes a new instance of Frame
that is not visible
and has no title.
Frame
public Frame(java.awt.GraphicsConfiguration gc)
Parameters:
Frame
public Frame(java.lang.String title)
Initializes a new instance of Frame
that is not visible
and has the specified title.
Parameters:
Frame
public Frame(java.lang.String title, java.awt.GraphicsConfiguration gc)
Parameters:
addNotify
public void addNotify()
Notifies this frame that it should create its native peer.
dispose
public void dispose()
Destroys any resources associated with this frame. This includes
all components in the frame and all owned toplevel windows.
getCursorType
public int getCursorType()
Returns the cursor type of the cursor for this window. This will
be one of the constants in this class.
Returns:
- The cursor type for this frame.
getFrames
public static Frame[] getFrames()
getIconImage
public Image getIconImage()
Returns this frame's icon.
Returns:
- This frame's icon, or
null
if this frame does not
have an icon.
getMenuBar
public MenuBar getMenuBar()
Returns this frame's menu bar.
Returns:
- This frame's menu bar, or
null
if this frame
does not have a menu bar.
getState
public int getState()
getTitle
public String getTitle()
Returns this frame's title string.
Returns:
- This frame's title string.
isResizable
public boolean isResizable()
Tests whether or not this frame is resizable. This will be
true
by default.
Returns:
true
if this frame is resizable, false
otherwise.
paramString
protected String paramString()
Returns a debugging string describing this window.
Returns:
- A debugging string describing this window.
remove
public void remove(java.awt.MenuComponent menu)
Removes the specified component from this frame's menu.
Parameters:
setCursor
public void setCursor(int type)
Sets the cursor for this window to the specified type. The specified
type should be one of the constants in this class.
Parameters:
setIconImage
public synchronized void setIconImage(java.awt.Image icon)
Sets this frame's icon to the specified value.
Parameters:
setMenuBar
public synchronized void setMenuBar(java.awt.MenuBar menuBar)
Sets this frame's menu bar.
Parameters:
setResizable
public synchronized void setResizable(boolean resizable)
Sets the resizability of this frame to the specified value.
Parameters:
setTitle
public synchronized void setTitle(java.lang.String title)
Parameters: