A top-level window with a border and title is called a class Frame. As the default layout manager, it makes use of BorderLayout. A Windows graphics system, the java.awt.Frame component contains borders and a title bar, just like a typical GUI window. The components of default alignment added to a Java.awt.BorderLayout.
Field |
Description |
static float BOTTOM_ALIGNMENT |
Constant of ease of use for getAlignment Y |
static int CROSSHAIR_CURSOR |
Redundant. modified by Cursor.CROSSHAIR_CURSOR |
static int DEFAULT_CURSOR |
Redundant. modified by Cursor.DEFAULT_CURSOR. |
static int HAND_CURSOR |
Redundant. modified by Cursor.HAND_CURSOR. |
static int E_RESIZE_CURSOR |
Redundant. modified by Cursor.E_RESIZE_CURSOR. |
static int MOVE_CURSOR |
Redundant. modified by Cursor.MOVE_CURSOR. |
static int MAXIMIZED_HORIZ |
The horizontal direction of frame maximisation is indicated by this state bit. |
static int MAXIMIZED_VERT |
The vertical direction of frame maximisation is indicated by this state bit. |
static int MAXIMIZED_BOTH |
The frame is fully maximised (horizontally and vertically) according to this state bit mask. |
static int ICONIFIED |
The frame is iconified, according to this state bit. |
static int N_RESIZE_CURSOR |
Redundant. modified by Cursor.N_RESIZE_CURSOR. |
static int NE_RESIZE_CURSOR |
Redundant. modified by Cursor.NE_RESIZE_CURSOR. |
static int NORMAL |
Frame works in "normal" mode. |
static int NW_RESIZE_CURSOR |
Redundant. modified by Cursor.NW_RESIZE_CURSOR. |
static int S_RESIZE_CURSOR |
Redundant. modified by Cursor.S_RESIZE_CURSOR. |
static int SE_RESIZE_CURSOR |
Redundant. modified by Cursor.SE_RESIZE_CURSOR. |
static int SW_RESIZE_CURSOR |
Redundant. modified by Cursor.SW_RESIZE_CURSOR. |
static int TEXT_CURSOR |
Redundant. modified by Cursor.TEXT_CURSOR. |
static int WAIT_CURSOR |
Redundant. modified by Cursor.WAIT_CURSOR. |
Method |
Description |
void addNotify() |
Connects this Frame to a native screen resource to make it displayable. |
AccessibleContext getAccessibleContext() |
Obtains the AccessibleContext linked to this particular Frame. |
static Frame[] getFrames() |
Returns an array containing every Frame this application has created. |
int getExtendedState() |
Obtains this frame's status. |
int getCursorType() |
Redundant. Since JDK version 1.1, Component has taken its place.obtainCursor(). |
Image getIconImage() |
Returns the picture that will be used as this frame's symbol. |
String getTitle() |
Get the frame's title. |
int getState() |
Gets this frame's state (obsolete). |
MenuBar getMenuBar() |
Obtains the frame's menu bar. |
Rectangle getMaximizedBounds() |
Obtains the frame's maximised limits. |
boolean isResizable() |
Shows whether the user may resize this frame. |
void removeNotify() |
Breaks this Frame's link to its native screen resource, rendering it undisplayable. |
void remove(MenuComponent m) |
Removes from this frame the given menu bar. |
protected String paramString() |
Returns back a string that describes this Frame's current state. |
boolean isUndecorated() |
Indicates if there are any decorations on this frame. |
void setCursor(int cursorType) |
Redundant. Since JDK 1.1, Component.setCursor(Cursor) has taken its place. |
void setMenuBar(MenuBar mb) |
Sets the given menu bar as the frame's menu bar. |
void setMaximizedBounds(Rectangle bounds) |
Determines the frame's maximised limits. |
void setIconImage(Image image) |
Sets the picture that will appear as this window's icon. |
void setExtendedState(int state) |
Sets this frame's status. |
void setResizable(boolean resizable) |
Determines if the user may resize this frame. |
void setUndecorated(boolean undecorated) |
Turns on or off the frame's decorations. |
void setTitle(String title) |
Sets the given string as this frame's title. |
void setState(int state) |
Sets this frame's state (obsolete). |
These steps are essentially followed while working with Frame objects in order to make a window show up on the screen.