public class Frame extends Window implements MenuContainer
| Modifier and Type | Class and Description |
|---|---|
protected class |
Frame.AccessibleAWTFrame
Accessibility support for
Frame. |
Window.AccessibleAWTWindowContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy| Modifier and Type | Field and Description |
|---|---|
static int |
CROSSHAIR_CURSOR
Deprecated.
Use
Cursor.CROSSHAIR_CURSOR instead. |
static int |
DEFAULT_CURSOR
Deprecated.
Replaced by
Cursor.DEFAULT_CURSOR instead. |
static int |
E_RESIZE_CURSOR
Deprecated.
Use
Cursor.E_RESIZE_CURSOR instead. |
static int |
HAND_CURSOR
Deprecated.
Use
Cursor.HAND_CURSOR instead. |
static int |
ICONIFIED |
static int |
MAXIMIZED_BOTH |
static int |
MAXIMIZED_HORIZ |
static int |
MAXIMIZED_VERT |
static int |
MOVE_CURSOR
Deprecated.
Use
Cursor.MOVE_CURSOR instead. |
static int |
N_RESIZE_CURSOR
Deprecated.
Use
Cursor.N_RESIZE_CURSOR instead. |
static int |
NE_RESIZE_CURSOR
Deprecated.
Use
Cursor.NE_RESIZE_CURSOR instead. |
static int |
NORMAL |
static int |
NW_RESIZE_CURSOR
Deprecated.
Use
Cursor.NW_RESIZE_CURSOR instead. |
static int |
S_RESIZE_CURSOR
Deprecated.
Use
Cursor.S_RESIZE_CURSOR instead. |
static int |
SE_RESIZE_CURSOR
Deprecated.
Use
Cursor.SE_RESIZE_CURSOR instead. |
static int |
SW_RESIZE_CURSOR
Deprecated.
Use
Cursor.SW_RESIZE_CURSOR instead. |
static int |
TEXT_CURSOR
Deprecated.
Use
Cursor.TEXT_CURSOR instead. |
static int |
W_RESIZE_CURSOR
Deprecated.
Use
Cursor.W_RESIZE_CURSOR instead. |
static int |
WAIT_CURSOR
Deprecated.
Use
Cursor.WAIT_CURSOR. |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
Frame()
Initializes a new instance of
Frame that is not visible
and has no title. |
Frame(GraphicsConfiguration gc) |
Frame(String title)
Initializes a new instance of
Frame that is not visible
and has the specified title. |
Frame(String title,
GraphicsConfiguration gc) |
| Modifier and Type | Method and Description |
|---|---|
void |
addNotify()
Creates the native peer for this window.
|
AccessibleContext |
getAccessibleContext()
Gets the AccessibleContext associated with this
Frame. |
int |
getCursorType()
Deprecated.
Use
Component.getCursor() instead. |
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()
Called when this container is removed from its parent container to
inform it to destroy its peer.
|
void |
setCursor(int type)
Deprecated.
Use
Component.setCursor(Cursor) instead. |
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.
|
addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getGraphicsConfiguration, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, processEvent, processWindowEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setAlwaysOnTop, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, show, toBack, toFrontadd, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusDownCycle, update, validate, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetFont, postEventpublic static final int DEFAULT_CURSOR
Cursor.DEFAULT_CURSOR instead.public static final int CROSSHAIR_CURSOR
Cursor.CROSSHAIR_CURSOR instead.public static final int TEXT_CURSOR
Cursor.TEXT_CURSOR instead.public static final int WAIT_CURSOR
Cursor.WAIT_CURSOR.public static final int SW_RESIZE_CURSOR
Cursor.SW_RESIZE_CURSOR instead.public static final int SE_RESIZE_CURSOR
Cursor.SE_RESIZE_CURSOR instead.public static final int NW_RESIZE_CURSOR
Cursor.NW_RESIZE_CURSOR instead.public static final int NE_RESIZE_CURSOR
Cursor.NE_RESIZE_CURSOR instead.public static final int N_RESIZE_CURSOR
Cursor.N_RESIZE_CURSOR instead.public static final int S_RESIZE_CURSOR
Cursor.S_RESIZE_CURSOR instead.public static final int E_RESIZE_CURSOR
Cursor.E_RESIZE_CURSOR instead.public static final int W_RESIZE_CURSOR
Cursor.W_RESIZE_CURSOR instead.public static final int HAND_CURSOR
Cursor.HAND_CURSOR instead.public static final int MOVE_CURSOR
Cursor.MOVE_CURSOR instead.public static final int ICONIFIED
public static final int MAXIMIZED_BOTH
public static final int MAXIMIZED_HORIZ
public static final int MAXIMIZED_VERT
public static final int NORMAL
public Frame()
Frame that is not visible
and has no title.public Frame(String title)
Frame that is not visible
and has the specified title.title - the title of this framepublic Frame(GraphicsConfiguration gc)
public Frame(String title, GraphicsConfiguration gc)
public String getTitle()
public void setTitle(String title)
title - the new frame titlepublic Image getIconImage()
null if this frame does not
have an iconpublic void setIconImage(Image icon)
public MenuBar getMenuBar()
null if this frame
does not have a menu barpublic void setMenuBar(MenuBar menuBar)
menuBar - the new menu bar for this framepublic boolean isResizable()
true by default.true if this frame is resizable, false
otherwisepublic void setResizable(boolean resizable)
resizable - true to make the frame resizable,
false to make it non-resizablepublic int getCursorType()
Component.getCursor() instead.public void setCursor(int type)
Component.setCursor(Cursor) instead.type - the cursor typepublic void remove(MenuComponent menu)
remove in interface MenuContainerremove in class Componentmenu - the menu component to removeComponent.add(PopupMenu)public void addNotify()
WindowaddNotify in class WindowComponent.isDisplayable(),
Component.removeNotify()public void removeNotify()
ContainerremoveNotify in class ContainerComponent.isDisplayable(),
Component.addNotify()protected String paramString()
paramString in class Containerpublic void setState(int state)
public int getState()
public void setExtendedState(int state)
public int getExtendedState()
public void setMaximizedBounds(Rectangle maximizedBounds)
public Rectangle getMaximizedBounds()
public boolean isUndecorated()
public void setUndecorated(boolean undecorated)
IllegalComponentStateException - if this frame is displayablepublic AccessibleContext getAccessibleContext()
Frame.
The context is created, if necessary.getAccessibleContext in interface AccessiblegetAccessibleContext in class Window