Frame

Name

Frame

[Graphic: Figure from the text]

Description

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.

Class Definition

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(); (Deprecated) public Image getIconImage();
public MenuBar getMenuBar();
public String getTitle();
public boolean isResizable();
public synchronized void remove (MenuComponent component);
public synchronized void setCursor (int cursorType); (Deprecated) 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();
}

Constants

CROSSHAIR_CURSOR

public final static int CROSSHAIR_CURSOR

Constant representing a cursor that looks like a crosshair.

DEFAULT_CURSOR

public final static int DEFAULT_CURSOR

Constant representing the platform's default cursor.

E_RESIZE_CURSOR

public final static int E_RESIZE_CURSOR

Constant representing the cursor for resizing an object on the left.

HAND_CURSOR

public final static int HAND_CURSOR

Constant representing a cursor that looks like a hand.

MOVE_CURSOR

public final static int MOVE_CURSOR

Constant representing a cursor used to move an object.

N_RESIZE_CURSOR

public final static int N_RESIZE_CURSOR

Constant representing a cursor for resizing an object on the top.

NE_RESIZE_CURSOR

public final static int NE_RESIZE_CURSOR

Constant representing a cursor for resizing an object on the top left corner.

NW_RESIZE_CURSOR

public final static int NW_RESIZE_CURSOR

Constant representing a cursor for resizing an object on the top right corner.

S_RESIZE_CURSOR

public final static int S_RESIZE_CURSOR

Constant representing a cursor for resizing an object on the bottom.

SE_RESIZE_CURSOR

public final static int SE_RESIZE_CURSOR

Constant representing a cursor for resizing an object on the bottom left corner.

SW_RESIZE_CURSOR

public final static int SW_RESIZE_CURSOR

Constant representing a cursor for resizing an object on the bottom right corner.

TEXT_CURSOR

public final static int TEXT_CURSOR

Constant representing a cursor used within text.

W_RESIZE_CURSOR

public final static int W_RESIZE_CURSOR

Constant representing a cursor for resizing an object on the right side.

WAIT_CURSOR

public final static int WAIT_CURSOR

Constant representing a cursor that indicates the program is busy.

Constructors

Frame

public Frame()

public Frame (String title)

Instance Methods

addNotify

public void addNotify()

dispose

public synchronized void dispose()

getCursorType

public int getCursorType() (Deprecated)

getIconImage

public Image getIconImage()

getMenuBar

public MenuBar getMenuBar()

getTitle

public String getTitle()

isResizable

public boolean isResizable()

remove

public synchronized void remove (MenuComponent component)

setCursor

public synchronized void setCursor (int cursorType) (Deprecated)

setIconImage

public synchronized void setIconImage (Image image)

setMenuBar

public synchronized void setMenuBar (MenuBar bar)

setResizable

public synchronized void setResizable (boolean resizable)

setTitle

public synchronized void setTitle (String title)

Protected Instance Methods

paramString

protected String paramString()

See Also

Container, Image, MenuBar, MenuContainer, String, Window