java.awt
public class Frame extends Window implements MenuContainer
Nested Class Summary | |
---|---|
protected class | Frame.AccessibleAWTFrame
Accessibility support for Frame . |
Field Summary | |
---|---|
static int | CROSSHAIR_CURSOR
Constant for a cross-hair cursor.
|
static int | DEFAULT_CURSOR
Constant for the default cursor.
|
static int | E_RESIZE_CURSOR
Cursor used over E edge of window decorations.
|
static int | HAND_CURSOR
Constant for a hand cursor.
|
static int | ICONIFIED |
static int | MAXIMIZED_BOTH |
static int | MAXIMIZED_HORIZ |
static int | MAXIMIZED_VERT |
static int | MOVE_CURSOR
Constant for a cursor used during window move operations.
|
static int | NE_RESIZE_CURSOR
Cursor used over NE corner of window decorations.
|
static int | NORMAL |
static int | NW_RESIZE_CURSOR
Cursor used over NW corner of window decorations.
|
static int | N_RESIZE_CURSOR
Cursor used over N edge of window decorations.
|
static int | SE_RESIZE_CURSOR
Cursor used over SE corner of window decorations. |
static int | SW_RESIZE_CURSOR
Cursor used over SW corner of window decorations.
|
static int | S_RESIZE_CURSOR
Cursor used over S edge of window decorations.
|
static int | TEXT_CURSOR
Constant for a cursor over a text field.
|
static int | WAIT_CURSOR
Constant for a cursor to display while waiting for an action to complete.
|
static int | W_RESIZE_CURSOR
Cursor used over W edge of window decorations.
|
Constructor Summary | |
---|---|
Frame()
Initializes a new instance of Frame that is not visible
and has no title. | |
Frame(String title)
Initializes a new instance of Frame that is not visible
and has the specified title.
| |
Frame(GraphicsConfiguration gc) | |
Frame(String title, GraphicsConfiguration gc) |
Method Summary | |
---|---|
void | addNotify() |
AccessibleContext | getAccessibleContext()
Gets the AccessibleContext associated with this Frame .
|
int | getCursorType()
Returns the cursor type of the cursor for this window. |
int | getExtendedState() |
static Frame[] | getFrames() |
Image | getIconImage()
Returns this frame's icon.
|
Rectangle | getMaximizedBounds()
Returns the maximized bounds of this frame.
|
MenuBar | getMenuBar()
Returns this frame's menu bar.
|
int | getState() |
String | getTitle()
Returns this frame's title string.
|
boolean | isResizable()
Tests whether or not this frame is resizable. |
boolean | isUndecorated()
Returns whether this frame is undecorated or not.
|
protected String | paramString()
Returns a debugging string describing this window.
|
void | remove(MenuComponent menu)
Removes the specified menu component from this frame. |
void | removeNotify() |
void | setCursor(int type)
Sets the cursor for this window to the specified type. |
void | setExtendedState(int state) |
void | setIconImage(Image icon)
Sets this frame's icon to the specified value.
|
void | setMaximizedBounds(Rectangle maximizedBounds) |
void | setMenuBar(MenuBar menuBar)
Sets this frame's menu bar. |
void | setResizable(boolean resizable)
Sets the resizability of this frame to the specified value.
|
void | setState(int state) |
void | setTitle(String title)
Sets this frame's title to the specified value.
|
void | setUndecorated(boolean undecorated)
Disables or enables decorations for this frame. |
Deprecated: Use Cursor.CROSSHAIR_CURSOR
instead.
Deprecated: Replaced by Cursor.DEFAULT_CURSOR
instead.
Deprecated: Use Cursor.E_RESIZE_CURSOR
instead.
Deprecated: Use Cursor.HAND_CURSOR
instead.
Deprecated: Use Cursor.MOVE_CURSOR
instead.
Deprecated: Use Cursor.NE_RESIZE_CURSOR
instead.
Deprecated: Use Cursor.NW_RESIZE_CURSOR
instead.
Deprecated: Use Cursor.N_RESIZE_CURSOR
instead.
Deprecated: Use Cursor.SE_RESIZE_CURSOR
instead.
Deprecated: Use Cursor.SW_RESIZE_CURSOR
instead.
Deprecated: Use Cursor.S_RESIZE_CURSOR
instead.
Deprecated: Use Cursor.TEXT_CURSOR
instead.
Deprecated: Use Cursor.WAIT_CURSOR
.
Deprecated: Use Cursor.W_RESIZE_CURSOR
instead.
Frame
that is not visible
and has no title.Frame
that is not visible
and has the specified title.
Parameters: title the title of this frame
Frame
.
The context is created, if necessary.
Returns: the associated context
Deprecated: Use Component.getCursor()
instead.
Returns: the cursor type for this frame
Since: 1.4
Returns: this frame's icon, or null
if this frame does not
have an icon
Returns: the maximized rectangle, may be null
Since: 1.4
Returns: this frame's menu bar, or null
if this frame
does not have a menu bar
Returns: this frame's title string
true
by default.
Returns: true
if this frame is resizable, false
otherwise
Since: 1.4
Returns: a debugging string describing this window
Parameters: menu the menu component to remove
Deprecated: Use Component.setCursor(Cursor)
instead.
Parameters: type the cursor type
Since: 1.4
UNKNOWN: the new icon for this frame
Since: 1.4
Parameters: menuBar the new menu bar for this frame
Parameters: resizable true
to make the frame resizable,
false
to make it non-resizable
Parameters: title the new frame title
Throws: IllegalComponentStateException if this frame is displayable
Since: 1.4