Example usage for Java java.awt Frame fields, constructors, methods, implement or subclass
The text is from its open source code.
int | NORMAL Frame is in the "normal" state. |
int | ICONIFIED This state bit indicates that frame is iconified. |
int | MAXIMIZED_HORIZ This state bit indicates that frame is maximized in the horizontal direction. |
int | MAXIMIZED_VERT This state bit indicates that frame is maximized in the vertical direction. |
int | MAXIMIZED_BOTH This state bit mask indicates that frame is fully maximized (that is both horizontally and vertically). |
Frame() Constructs a new instance of Frame that is initially invisible. | |
Frame(GraphicsConfiguration gc) Constructs a new, initially invisible Frame with the specified GraphicsConfiguration . | |
Frame(String title) Constructs a new, initially invisible Frame object with the specified title. |
Component | add(Component comp) Appends the specified component to the end of this container. |
Component | add(String name, Component comp) Adds the specified component to this container. |
void | addComponentListener(ComponentListener l) Adds the specified component listener to receive component events from this component. |
void | addNotify() Makes this Frame displayable by connecting it to a native screen resource. |
void | addWindowFocusListener(WindowFocusListener l) Adds the specified window focus listener to receive window events from this window. |
void | addWindowListener(WindowListener l) Adds the specified window listener to receive window events from this window. |
void | addWindowStateListener(WindowStateListener l) Adds the specified window state listener to receive window events from this window. |
void | createBufferStrategy(int numBuffers) Creates a new strategy for multi-buffering on this component. |
Image | createImage(int width, int height) Creates an off-screen drawable image to be used for double buffering. |
void | dispatchEvent(AWTEvent e) Dispatches an event to this component or one of its sub components. |
void | dispose() Releases all of the native screen resources used by this Window , its subcomponents, and all of its owned children. |
Rectangle | getBounds() Gets the bounds of this component in the form of a Rectangle object. |
BufferStrategy | getBufferStrategy() Returns the BufferStrategy used by this component. |
Class> | getClass() Returns the runtime class of this Object . |
Component[] | getComponents() Gets all the components in this container. |
int | getExtendedState() Gets the state of this frame. |
FontMetrics | getFontMetrics(Font font) Gets the font metrics for the specified font. |
Frame[] | getFrames() Returns an array of all Frame s created by this application. |
GraphicsConfiguration | getGraphicsConfiguration() Gets the GraphicsConfiguration associated with this Component . |
int | getHeight() Returns the current height of this component. |
Image | getIconImage() Returns the image to be displayed as the icon for this frame. |
Insets | getInsets() Determines the insets of this container, which indicate the size of the container's border. |
Point | getLocation() Gets the location of this component in the form of a point specifying the component's top-left corner. |
Point | getLocationOnScreen() Gets the location of this component in the form of a point specifying the component's top-left corner in the screen's coordinate space. |
String | getName() Gets the name of the component. |
Dimension | getSize() Returns the size of this component in the form of a Dimension object. |
String | getTitle() Gets the title of the frame. |
Toolkit | getToolkit() Returns the toolkit of this frame. |
int | getWidth() Returns the current width of this component. |
int | getX() Returns the current x coordinate of the components origin. |
int | getY() Returns the current y coordinate of the components origin. |
boolean | isActive() Returns whether this Window is active. |
boolean | isFocused() Returns whether this Window is focused. |
boolean | isResizable() Indicates whether this frame is resizable by the user. |
boolean | isShowing() Checks if this Window is showing on screen. |
boolean | isUndecorated() Indicates whether this frame is undecorated. |
boolean | isVisible() Determines whether this component should be visible when its parent is visible. |
void | pack() Causes this Window to be sized to fit the preferred size and layouts of its subcomponents. |
void | removeWindowFocusListener(WindowFocusListener l) Removes the specified window focus listener so that it no longer receives window events from this window. |
void | removeWindowListener(WindowListener l) Removes the specified window listener so that it no longer receives window events from this window. |
void | repaint() Repaints this component. |
void | requestFocus() Requests that this Component get the input focus, and that this Component's top-level ancestor become the focused Window. |
void | setBackground(Color bgColor) |
void | setBounds(Rectangle r) The r.width or r.height values will be automatically enlarged if either is less than the minimum size as specified by previous call to setMinimumSize . |
void | setCursor(int cursorType) Sets the cursor for this frame to the specified type. |
void | setEnabled(boolean b) Enables or disables this component, depending on the value of the parameter b . |
void | setExtendedState(int state) Sets the state of this frame. |
void | setFont(Font f) Sets the font of this container. |
void | setIconImage(Image image) |
void | setIconImages(java.util.List extends Image> icons) Sets the sequence of images to be displayed as the icon for this window. |
void | setIgnoreRepaint(boolean ignoreRepaint) Sets whether or not paint messages received from the operating system should be ignored. |
void | setLayout(LayoutManager mgr) Sets the layout manager for this container. |
void | setLocation(int x, int y) The method changes the geometry-related data. |
void | setLocation(Point p) The method changes the geometry-related data. |
void | setLocationRelativeTo(Component c) Sets the location of the window relative to the specified component according to the following scenarios. |
void | setMaximizedBounds(Rectangle bounds) Sets the maximized bounds for this frame. |
void | setName(String name) Sets the name of the component to the specified string. |
void | setResizable(boolean resizable) Sets whether this frame is resizable by the user. |
void | setSize(int width, int height) The width and height values are automatically enlarged if either is less than the minimum size as specified by previous call to setMinimumSize . |
void | setSize(Dimension d) The d.width and d.height values are automatically enlarged if either is less than the minimum size as specified by previous call to setMinimumSize . |
void | setState(int state) Sets the state of this frame (obsolete). |
void | setTitle(String title) Sets the title for this frame to the specified string. |
void | setUndecorated(boolean undecorated) Disables or enables decorations for this frame. |
void | setVisible(boolean b) Shows or hides this Window depending on the value of parameter b . |
void | show() Makes the Window visible. |
void | toFront() If this Window is visible, brings this Window to the front and may make it the focused Window. |
void | validate() Validates this container and all of its subcomponents. |