Example usage for Java java.awt Window fields, constructors, methods, implement or subclass
The text is from its open source code.
Window(GraphicsConfiguration gc) Constructs a new, initially invisible window in default size with the specified GraphicsConfiguration . | |
Window(Frame owner) Constructs a new, initially invisible window with the specified Frame as its owner. | |
Window(Window owner) Constructs a new, initially invisible window with the specified Window as its owner. |
Component | add(String name, Component comp) Adds the specified component to this container. |
Component | add(Component comp) Appends the specified component to the end of this container. |
void | addComponentListener(ComponentListener l) Adds the specified component listener to receive component events from this component. |
void | addMouseListener(MouseListener l) Adds the specified mouse listener to receive mouse events from this component. |
void | addPropertyChangeListener(String propertyName, PropertyChangeListener listener) Adds a PropertyChangeListener to the listener list for a specific property. |
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 | 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 . |
ComponentListener[] | getComponentListeners() Returns an array of all the component listeners registered on this component. |
Cursor | getCursor() Gets the cursor set in the component. |
boolean | getFocusableWindowState() Returns whether this Window can become the focused Window if it meets the other requirements outlined in isFocusableWindow . |
GraphicsConfiguration | getGraphicsConfiguration() Gets the GraphicsConfiguration associated with this Component . |
int | getHeight() Returns the current height of this component. |
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. |
Window[] | getOwnedWindows() Return an array containing all the windows this window currently owns. |
Window | getOwner() Returns the owner of this window. |
Window[] | getOwnerlessWindows() Returns an array of all Window s created by this application that have no owner. |
Container | getParent() Gets the parent of this component. |
Dimension | getPreferredSize() Returns the preferred size of this container. |
Dimension | getSize() Returns the size of this component in the form of a Dimension object. |
Toolkit | getToolkit() Returns the toolkit of this frame. |
int | getWidth() Returns the current width of this component. |
WindowListener[] | getWindowListeners() Returns an array of all the window listeners registered on this window. |
Window[] | getWindows() Returns an array of all Window s, both owned and ownerless, created by this application. |
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 | isAlwaysOnTop() Returns whether this window is an always-on-top window. |
boolean | isFocused() Returns whether this Window is focused. |
boolean | isShowing() Checks if this Window is showing on screen. |
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 | remove(int index) Removes the component, specified by index , from this container. |
void | removePropertyChangeListener(String propertyName, PropertyChangeListener listener) Removes a PropertyChangeListener from the listener list for a specific property. |
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. |
boolean | requestFocusInWindow() Requests that this Component get the input focus, if this Component's top-level ancestor is already the focused Window. |
void | setAlwaysOnTop(boolean alwaysOnTop) Sets whether this window should always be above other windows. |
void | setBackground(Color bgColor) Sets the background color of this window. |
void | setBounds(int x, int y, int width, int height) The width or height values are automatically enlarged if either is less than the minimum size as specified by previous call to setMinimumSize . |
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(Cursor cursor) Set the cursor image to a specified cursor. |
void | setFocusableWindowState(boolean focusableWindowState) Sets whether this Window can become the focused Window if it meets the other requirements outlined in isFocusableWindow . |
void | setFont(Font f) Sets the font of this container. |
void | setForeground(Color c) Sets the foreground color of this component. |
void | setIconImage(Image image) Sets the image to be displayed as the icon for this window. |
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 | setLocationByPlatform(boolean locationByPlatform) Sets whether this Window should appear at the default location for the native windowing system or at the current location (returned by getLocation ) the next time the Window is made visible. |
void | setLocationRelativeTo(Component c) Sets the location of the window relative to the specified component according to the following scenarios. |
void | setMinimumSize(Dimension minimumSize) Sets the minimum size of this window to a constant value. |
void | setName(String name) Sets the name of the component to the specified string. |
void | setPreferredSize(Dimension preferredSize) Sets the preferred size of this component to a constant value. |
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 | 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 | setVisible(boolean b) Shows or hides this Window depending on the value of parameter b . |
void | toBack() If this Window is visible, sends this Window to the back and may cause it to lose focus or activation if it is the focused or active Window. |
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. |