java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
protected class
Frame.AccessibleAWTFrame
Frame
.
static int
CROSSHAIR_CURSOR
Cursor.CROSSHAIR_CURSOR
instead.static int
DEFAULT_CURSOR
Cursor.DEFAULT_CURSOR
instead.static int
E_RESIZE_CURSOR
Cursor.E_RESIZE_CURSOR
instead.static int
HAND_CURSOR
Cursor.HAND_CURSOR
instead.static int
static int
static int
static int
static int
MOVE_CURSOR
Cursor.MOVE_CURSOR
instead.static int
NE_RESIZE_CURSOR
Cursor.NE_RESIZE_CURSOR
instead.static int
static int
NW_RESIZE_CURSOR
Cursor.NW_RESIZE_CURSOR
instead.static int
N_RESIZE_CURSOR
Cursor.N_RESIZE_CURSOR
instead.static int
SE_RESIZE_CURSOR
Cursor.SE_RESIZE_CURSOR
instead.static int
SW_RESIZE_CURSOR
Cursor.SW_RESIZE_CURSOR
instead.static int
S_RESIZE_CURSOR
Cursor.S_RESIZE_CURSOR
instead.static int
TEXT_CURSOR
Cursor.TEXT_CURSOR
instead.static int
WAIT_CURSOR
Cursor.WAIT_CURSOR
.static int
W_RESIZE_CURSOR
Cursor.W_RESIZE_CURSOR
instead.Frame()
Frame
that is not visible
and has no title.
Frame(String title, GraphicsConfiguration gc)
void
addNotify()
AccessibleContext
getAccessibleContext()
Frame
.
int
getCursorType()
Component.getCursor()
instead. int
Image
getIconImage()
Rectangle
getMaximizedBounds()
MenuBar
getMenuBar()
int
getState()
boolean
isResizable()
boolean
isUndecorated()
protected String
paramString()
void
remove(MenuComponent menu)
void
removeNotify()
void
setCursor(int type)
Component.setCursor(Cursor)
instead. void
setExtendedState(int state)
void
setIconImage(Image icon)
void
setMaximizedBounds(Rectangle maximizedBounds)
void
setMenuBar(MenuBar menuBar)
void
setResizable(boolean resizable)
void
setState(int state)
void
setUndecorated(boolean undecorated)
addNotify
, addWindowFocusListener
, addWindowListener
, addWindowStateListener
, applyResourceBundle
, applyResourceBundle
, createBufferStrategy
, createBufferStrategy
, dispose
, extends EventListener> T[] getListeners
, getAccessibleContext
, getBufferStrategy
, getFocusCycleRootAncestor
, getFocusOwner
, getFocusableWindowState
, getGraphicsConfiguration
, getLocale
, getMostRecentFocusOwner
, getOwnedWindows
, getOwner
, getToolkit
, getWarningString
, getWindowFocusListeners
, getWindowListeners
, getWindowStateListeners
, isActive
, isAlwaysOnTop
, isFocusCycleRoot
, isFocusableWindow
, isFocused
, isShowing
, pack
, postEvent
, processEvent
, processWindowEvent
, processWindowFocusEvent
, processWindowStateEvent
, removeWindowFocusListener
, removeWindowListener
, removeWindowStateListener
, setAlwaysOnTop
, setCursor
, setFocusCycleRoot
, setFocusableWindowState
, setLocationRelativeTo
, toBack
, toFront
, void hide
, void show
add
, add
, add
, add
, add
, addContainerListener
, addImpl
, addNotify
, addPropertyChangeListener
, addPropertyChangeListener
, applyComponentOrientation
, areFocusTraversalKeysSet
, countComponents
, deliverEvent
, doLayout
, extends EventListener> T[] getListeners
, findComponentAt
, findComponentAt
, getAlignmentX
, getAlignmentY
, getComponent
, getComponentAt
, getComponentAt
, getComponentCount
, getComponentZOrder
, getComponents
, getContainerListeners
, getFocusTraversalKeys
, getFocusTraversalPolicy
, getInsets
, getLayout
, getMaximumSize
, getMinimumSize
, getPreferredSize
, insets
, invalidate
, isAncestorOf
, isFocusCycleRoot
, isFocusCycleRoot
, isFocusTraversalPolicyProvider
, isFocusTraversalPolicySet
, layout
, list
, list
, locate
, minimumSize
, paint
, paintComponents
, paramString
, preferredSize
, print
, printComponents
, processContainerEvent
, processEvent
, remove
, remove
, removeAll
, removeContainerListener
, removeNotify
, setComponentZOrder
, setFocusCycleRoot
, setFocusTraversalKeys
, setFocusTraversalPolicy
, setFocusTraversalPolicyProvider
, setFont
, setLayout
, transferFocusDownCycle
, update
, validate
, validateTree
action
, add
, addComponentListener
, addFocusListener
, addHierarchyBoundsListener
, addHierarchyListener
, addInputMethodListener
, addKeyListener
, addMouseListener
, addMouseMotionListener
, addMouseWheelListener
, addNotify
, addPropertyChangeListener
, addPropertyChangeListener
, applyComponentOrientation
, areFocusTraversalKeysSet
, bounds
, checkImage
, checkImage
, coalesceEvents
, contains
, contains
, createImage
, createImage
, createVolatileImage
, createVolatileImage
, deliverEvent
, disable
, disableEvents
, dispatchEvent
, doLayout
, enable
, enable
, enableEvents
, enableInputMethods
, extends EventListener> T[] getListeners
, firePropertyChange
, firePropertyChange
, firePropertyChange
, firePropertyChange
, firePropertyChange
, firePropertyChange
, firePropertyChange
, firePropertyChange
, firePropertyChange
, getAccessibleContext
, getAlignmentX
, getAlignmentY
, getBackground
, getBounds
, getBounds
, getColorModel
, getComponentAt
, getComponentAt
, getComponentListeners
, getComponentOrientation
, getCursor
, getDropTarget
, getFocusCycleRootAncestor
, getFocusListeners
, getFocusTraversalKeys
, getFocusTraversalKeysEnabled
, getFont
, getFontMetrics
, getForeground
, getGraphics
, getGraphicsConfiguration
, getHeight
, getHierarchyBoundsListeners
, getHierarchyListeners
, getIgnoreRepaint
, getInputContext
, getInputMethodListeners
, getInputMethodRequests
, getKeyListeners
, getLocale
, getLocation
, getLocation
, getLocationOnScreen
, getMaximumSize
, getMinimumSize
, getMouseListeners
, getMouseMotionListeners
, getMouseWheelListeners
, getName
, getParent
, getPeer
, getPreferredSize
, getPropertyChangeListeners
, getPropertyChangeListeners
, getSize
, getSize
, getToolkit
, getTreeLock
, getWidth
, getX
, getY
, gotFocus
, handleEvent
, hasFocus
, hide
, imageUpdate
, inside
, invalidate
, isBackgroundSet
, isCursorSet
, isDisplayable
, isDoubleBuffered
, isEnabled
, isFocusCycleRoot
, isFocusOwner
, isFocusTraversable
, isFocusable
, isFontSet
, isForegroundSet
, isLightweight
, isMaximumSizeSet
, isMinimumSizeSet
, isOpaque
, isPreferredSizeSet
, isShowing
, isValid
, isVisible
, keyDown
, keyUp
, layout
, list
, list
, list
, list
, list
, locate
, location
, lostFocus
, minimumSize
, mouseDown
, mouseDrag
, mouseEnter
, mouseExit
, mouseMove
, mouseUp
, move
, nextFocus
, paint
, paintAll
, paramString
, postEvent
, preferredSize
, prepareImage
, prepareImage
, print
, printAll
, processComponentEvent
, processEvent
, processFocusEvent
, processHierarchyBoundsEvent
, processHierarchyEvent
, processInputMethodEvent
, processKeyEvent
, processMouseEvent
, processMouseMotionEvent
, processMouseWheelEvent
, remove
, removeComponentListener
, removeFocusListener
, removeHierarchyBoundsListener
, removeHierarchyListener
, removeInputMethodListener
, removeKeyListener
, removeMouseListener
, removeMouseMotionListener
, removeMouseWheelListener
, removeNotify
, removePropertyChangeListener
, removePropertyChangeListener
, repaint
, repaint
, repaint
, repaint
, requestFocus
, requestFocus
, requestFocusInWindow
, requestFocusInWindow
, reshape
, resize
, resize
, setBackground
, setBounds
, setBounds
, setComponentOrientation
, setCursor
, setDropTarget
, setEnabled
, setFocusTraversalKeys
, setFocusTraversalKeysEnabled
, setFocusable
, setFont
, setForeground
, setIgnoreRepaint
, setLocale
, setLocation
, setLocation
, setMaximumSize
, setMinimumSize
, setName
, setPreferredSize
, setSize
, setSize
, setVisible
, show
, show
, size
, toString
, transferFocus
, transferFocusBackward
, transferFocusUpCycle
, update
, validate
public static final int CROSSHAIR_CURSOR
Deprecated. Use
Cursor.CROSSHAIR_CURSOR
instead.Constant for a cross-hair cursor.
- Field Value:
- 1
public static final int DEFAULT_CURSOR
Deprecated. Replaced by
Cursor.DEFAULT_CURSOR
instead.Constant for the default cursor.
- Field Value:
- 0
public static final int E_RESIZE_CURSOR
Deprecated. Use
Cursor.E_RESIZE_CURSOR
instead.Cursor used over E edge of window decorations.
- Field Value:
- 11
public static final int HAND_CURSOR
Deprecated. Use
Cursor.HAND_CURSOR
instead.Constant for a hand cursor.
- Field Value:
- 12
public static final int MOVE_CURSOR
Deprecated. Use
Cursor.MOVE_CURSOR
instead.Constant for a cursor used during window move operations.
- Field Value:
- 13
public static final int NE_RESIZE_CURSOR
Deprecated. Use
Cursor.NE_RESIZE_CURSOR
instead.Cursor used over NE corner of window decorations.
- Field Value:
- 7
public static final int NW_RESIZE_CURSOR
Deprecated. Use
Cursor.NW_RESIZE_CURSOR
instead.Cursor used over NW corner of window decorations.
- Field Value:
- 6
public static final int N_RESIZE_CURSOR
Deprecated. Use
Cursor.N_RESIZE_CURSOR
instead.Cursor used over N edge of window decorations.
- Field Value:
- 8
public static final int SE_RESIZE_CURSOR
Deprecated. Use
Cursor.SE_RESIZE_CURSOR
instead.Cursor used over SE corner of window decorations.
- Field Value:
- 5
public static final int SW_RESIZE_CURSOR
Deprecated. Use
Cursor.SW_RESIZE_CURSOR
instead.Cursor used over SW corner of window decorations.
- Field Value:
- 4
public static final int S_RESIZE_CURSOR
Deprecated. Use
Cursor.S_RESIZE_CURSOR
instead.Cursor used over S edge of window decorations.
- Field Value:
- 9
public static final int TEXT_CURSOR
Deprecated. Use
Cursor.TEXT_CURSOR
instead.Constant for a cursor over a text field.
- Field Value:
- 2
public static final int WAIT_CURSOR
Deprecated. Use
Cursor.WAIT_CURSOR
.Constant for a cursor to display while waiting for an action to complete.
- Field Value:
- 3
public static final int W_RESIZE_CURSOR
Deprecated. Use
Cursor.W_RESIZE_CURSOR
instead.Cursor used over W edge of window decorations.
- Field Value:
- 10
public Frame(GraphicsConfiguration gc)
public Frame(String title)
Initializes a new instance ofFrame
that is not visible and has the specified title.
- Parameters:
title
- the title of this frame
public Frame(String title, GraphicsConfiguration gc)
public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with thisFrame
. The context is created, if necessary.
- Specified by:
- getAccessibleContext in interface Accessible
- Overrides:
- getAccessibleContext in interface Window
- Returns:
- the associated context
public int getCursorType()
Deprecated. Use
Component.getCursor()
instead.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
public Image getIconImage()
Returns this frame's icon.
- Returns:
- this frame's icon, or
null
if this frame does not have an icon
public Rectangle getMaximizedBounds()
Returns the maximized bounds of this frame.
- Returns:
- the maximized rectangle, may be null
- Since:
- 1.4
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
public int getState()
public String getTitle()
Returns this frame's title string.
- Returns:
- this frame's title string
public boolean isResizable()
Tests whether or not this frame is resizable. This will betrue
by default.
- Returns:
true
if this frame is resizable,false
otherwise
public boolean isUndecorated()
Returns whether this frame is undecorated or not.
- Since:
- 1.4
protected String paramString()
Returns a debugging string describing this window.
- Overrides:
- paramString in interface Container
- Returns:
- a debugging string describing this window
public void remove(MenuComponent menu)
Removes the specified menu component from this frame. If it is the current MenuBar it is removed from the frame. If it is a Popup it is removed from this component. If it is any other menu component it is ignored.
- Specified by:
- remove in interface MenuContainer
- Parameters:
menu
- the menu component to remove
public void removeNotify()
Called when this container is removed from its parent container to inform it to destroy its peer. This causes the peers of all child component to be destroyed as well.
- Overrides:
- removeNotify in interface Container
public void setCursor(int type)
Deprecated. Use
Component.setCursor(Cursor)
instead.Sets the cursor for this window to the specified type. The specified type should be one of the constants in this class.
- Parameters:
type
- the cursor type
public void setMenuBar(MenuBar menuBar)
Sets this frame's menu bar. Removes any existing menu bar. If the given menu bar is part of another frame it will be removed from that frame.
- Parameters:
menuBar
- the new menu bar for this frame
public void setResizable(boolean resizable)
Sets the resizability of this frame to the specified value.
- Parameters:
resizable
-true
to make the frame resizable,false
to make it non-resizable
public void setState(int state)
public void setTitle(String title)
Sets this frame's title to the specified value.
- Parameters:
title
- the new frame title
public void setUndecorated(boolean undecorated)
Disables or enables decorations for this frame. This method can only be called while the frame is not displayable.
- Throws:
IllegalComponentStateException
- if this frame is displayable
- Since:
- 1.4