The Frame class is a special type of Window that will appear like other high-level programs in your windowing environment. It adds a MenuBar, window title, and window gadgets (like resize, maximize, minimize, window menu) to the basic Window object. Frames are initially invisible; call show() to display them. Frames may also be associated with an Image to be used as an icon. The Frame class includes many constants to represent different cursor styles. All styles aren't necessarily available on any platform. In 1.1, these constants are defined in java.awt.Cursor.
public class java.awt.Frame extends java.awt.Window implements java.awt.MenuContainer { // Constants public final static int CROSSHAIR_CURSOR; public final static int DEFAULT_CURSOR; public final static int E_RESIZE_CURSOR; public final static int HAND_CURSOR; public final static int MOVE_CURSOR; public final static int N_RESIZE_CURSOR; public final static int NE_RESIZE_CURSOR; public final static int NW_RESIZE_CURSOR; public final static int S_RESIZE_CURSOR; public final static int SE_RESIZE_CURSOR; public final static int SW_RESIZE_CURSOR; public final static int TEXT_CURSOR; public final static int W_RESIZE_CURSOR; public final static int WAIT_CURSOR; // Constructors public Frame(); public Frame (String title); // Instance Methods public void addNotify(); public synchronized void dispose(); public int getCursorType(); public Image getIconImage(); public MenuBar getMenuBar(); public String getTitle(); public boolean isResizable(); public synchronized void remove (MenuComponent component); public synchronized void setCursor (int cursorType); public synchronized void setIconImage (Image image); public synchronized void setMenuBar (MenuBar bar); public synchronized void setResizable (boolean resizable); public synchronized void setTitle (String title); // Protected Instance Methods protected String paramString(); }
Constant representing a cursor that looks like a crosshair.
Constant representing the platform's default cursor.
Constant representing the cursor for resizing an object on the left.
Constant representing a cursor that looks like a hand.
Constant representing a cursor used to move an object.
Constant representing a cursor for resizing an object on the top.
Constant representing a cursor for resizing an object on the top left corner.
Constant representing a cursor for resizing an object on the top right corner.
Constant representing a cursor for resizing an object on the bottom.
Constant representing a cursor for resizing an object on the bottom left corner.
Constant representing a cursor for resizing an object on the bottom right corner.
Constant representing a cursor used within text.
Constant representing a cursor for resizing an object on the right side.
Constant representing a cursor that indicates the program is busy.
Constructs a Frame object, with no title.
Initial title to use for Frame.
Constructs a Frame object, with the given title.
Window.addNotify()
Creates Frame's peer and peers of contained components.
Window.dispose()
Releases the resources of the Frame.
The constant for the current cursor. Replaced by Component.getCursor()
The image used as the icon, or null if there is no icon for this frame.
The Frame's current menu bar, or null if there is no menu bar for this frame.
The current title for the Frame, or null if there is no title for this frame.
true if resizable, false otherwise.
MenuBar to remove from Frame.
MenuContainer.remove()
Removes component from Frame if component is the Frame's menu bar.
One of Frame's cursor constants.
If cursorType invalid.
Changes the cursor of the Frame. Replaced by Component.setCursor(Cursor).
New image to use for the Frame's icon.
Changes the icon's image for the Frame.
New MenuBar to use for the Frame.
Changes the menu bar of the Frame.
true to make the frame resizable, false to prevent resizing.
Changes the resize state of the Frame.
New title to use for the Frame.
Changes the title of the Frame.
String with current settings of Frame.
Container.paramString()
Helper method for toString() to generate a string of current settings.
Container, Image, MenuBar, MenuContainer, String, Window
This HTML Help has been published using the chm2web software. |