| java.lang.Object java.awt.Component java.awt.Container java.awt.Window java.awt.Frame
All known Subclasses: basis.DemoFrame, tests.volatileImage.TestVolatileComponent, com.sun.xlet.ToplevelFrame, tests.volatileImage.TestVolatileGC, sun.awt.EmbeddedFrame, tests.fullScreenMode.TestFull, sun.applet.AppletProps, sun.mtask.xlet.XletFrame, sun.applet.TextFrame,
Frame | public class Frame extends Window implements MenuContainer(Code) | | A Frame is window with additional properties, such as a title bar,
a menu bar, a cursor, and an icon image where appropriate.
A Personal Profile implementation is not required to support multiple
frames. It must allow at least one frame to be created then it may
throw an UnsupportedOperationException on subsequent Frame creations.
The Title Property
The title property can be set when the frame is created and changed
at any time. How the title property is displayed and used is platform dependent.
The Resizable Property
The Resizable property determines if a frame can be resized by the
user. Personal Profile and PersonalJava, implementations are not required
to support resizable frames.
The Cursor Property
Not all cursors may be supported
System Properties
java.awt.frame.SupportsMultipleFrames "true" if the Personal Profile
implementation supports multiple frames, otherwise "false".
java.awt.frame.SupportsResizable "true" if the Personal Profile
implementation supports resizable frames, otherwise "false".
version: 1.6, 08/19/02 author: Nicholas Allen See Also: WindowEvent See Also: Window.addWindowListener since: JDK1.0 |
Constructor Summary | |
public | Frame() Constructs a new Frame
Compatibility
A Personal Profile implementation is not required to support multiple
Frames (the current Frame must be destroyed before a subsequent Frame
can be created). | public | Frame(String title) Constructs a new Frame
Compatibility
A Personal Profile implementation is not required to support multiple
Frames (the current Frame must be destroyed before a subsequent Frame
can be created). |
CROSSHAIR_CURSOR | final public static int CROSSHAIR_CURSOR(Code) | | |
DEFAULT_CURSOR | final public static int DEFAULT_CURSOR(Code) | | |
E_RESIZE_CURSOR | final public static int E_RESIZE_CURSOR(Code) | | |
HAND_CURSOR | final public static int HAND_CURSOR(Code) | | |
MOVE_CURSOR | final public static int MOVE_CURSOR(Code) | | |
NE_RESIZE_CURSOR | final public static int NE_RESIZE_CURSOR(Code) | | |
NW_RESIZE_CURSOR | final public static int NW_RESIZE_CURSOR(Code) | | |
N_RESIZE_CURSOR | final public static int N_RESIZE_CURSOR(Code) | | |
SE_RESIZE_CURSOR | final public static int SE_RESIZE_CURSOR(Code) | | |
SW_RESIZE_CURSOR | final public static int SW_RESIZE_CURSOR(Code) | | |
S_RESIZE_CURSOR | final public static int S_RESIZE_CURSOR(Code) | | |
TEXT_CURSOR | final public static int TEXT_CURSOR(Code) | | |
WAIT_CURSOR | final public static int WAIT_CURSOR(Code) | | |
W_RESIZE_CURSOR | final public static int W_RESIZE_CURSOR(Code) | | |
mbManagement | boolean mbManagement(Code) | | |
resizable | boolean resizable(Code) | | |
Frame | public Frame()(Code) | | Constructs a new Frame
Compatibility
A Personal Profile implementation is not required to support multiple
Frames (the current Frame must be destroyed before a subsequent Frame
can be created). Support for menu objects is independent of the level
of Frame support.
A PersonalJava implementation, which fully supported Frame, also
supported CheckBoxMenuItem, Menu, MenuBar and MenuShortcut.
JDK Fully supports multiple frames.
exception: UnsupportedOperationException - if multiple frames are createdon a platform which only supports a single frame. See Also: Component.setSize See Also: Component.setVisible since: JDK1.0 |
Frame | public Frame(String title)(Code) | | Constructs a new Frame
Compatibility
A Personal Profile implementation is not required to support multiple
Frames (the current Frame must be destroyed before a subsequent Frame
can be created). Support for menu objects is independent of the level
of Frame support.
A PersonalJava implementation, which fully supported Frame, also
supported CheckBoxMenuItem, Menu, MenuBar and MenuShortcut.
JDK Fully supports multiple frames.
Parameters: title - is the string specifying the frames title. exception: UnsupportedOperationException - if multiple frames are createdon a platform which only supports a single frame. See Also: java.awt.Component.setSize See Also: java.awt.Component.setVisible since: JDK1.0 |
addNotify | public void addNotify()(Code) | | |
addOwnedWindow | Window addOwnedWindow(Window window)(Code) | | Adds the specified window to the list of windows owned by
the frame.
Parameters: window - the window to be added |
constructComponentName | String constructComponentName()(Code) | | Construct a name for this component. Called by getName() when the
name is null.
|
dispose | public void dispose()(Code) | | Disposes of the Frame. This method must
be called to release the resources that
are used for the frame. All components
contained by the frame and all windows
owned by the frame will also be destroyed.
since: JDK1.0 |
getCursorType | public int getCursorType()(Code) | | |
getFrames | public static Frame[] getFrames()(Code) | | Returns an array containing all Frames created by the application.
If called from an applet, the array will only include the Frames
accessible by that applet.
since: 1.2 |
getIconImage | public Image getIconImage()(Code) | | Gets the icon image for this frame.
the icon image for this frame, or null if this frame doesn't have an icon image. See Also: java.awt.Frame.setIconImage since: JDK1.0 |
getMenuBar | public MenuBar getMenuBar()(Code) | | Gets the menu bar for this frame.
the menu bar for this frame, or null if this frame doesn't have a menu bar. See Also: java.awt.Frame.setMenuBar since: JDK1.0 |
getTitle | public String getTitle()(Code) | | Gets the title of the frame.
the title of this frame, or null if this frame doesn't have a title. See Also: java.awt.Frame.setTitle since: JDK1.0 |
isResizable | public boolean isResizable()(Code) | | Indicates whether this frame is resizable.
By default, all frames are initially resizable.
true if the user can resize this frame;false otherwise. See Also: java.awt.Frame.setResizable since: JDK1.0 |
paramString | protected String paramString()(Code) | | Returns the parameter String of this Frame.
|
remove | public void remove(MenuComponent m)(Code) | | Removes the specified menu bar from this frame.
Parameters: m - the menu component to remove. since: JDK1.0 |
removeNotify | public void removeNotify()(Code) | | |
removeOwnedWindow | void removeOwnedWindow(Window window)(Code) | | Removes the specified window from the list of windows owned by
the frame.
Parameters: window - the window to be added |
setCursor | public synchronized void setCursor(int cursorType)(Code) | | |
setIconImage | public synchronized void setIconImage(Image image)(Code) | | Sets the image to display when this frame is iconized.
Not all platforms support the concept of iconizing a window.
Parameters: image - the icon image to be displayed See Also: java.awt.Frame.getIconImage since: JDK1.0 |
setResizable | public synchronized void setResizable(boolean resizable)(Code) | | Sets the resizable Property
Compatability
In Personal Profile this method can have no effect. The
isResizable() method may be used to verify this.
Also the system property java.awt.frame.SupportsResizable is
"true" if the platform supports resizable frames.
Parameters: resizable - if true , the frame becomes resizable,otherwise the frame become non resizable. See Also: java.awt.Frame.isResizable since: JDK1.0 |
setTitle | public synchronized void setTitle(String title)(Code) | | Sets the title for this frame to the specified title.
Parameters: title - the specified title of this frame. See Also: java.awt.Frame.getTitle since: JDK1.0 |
validate | public void validate()(Code) | | |
Methods inherited from java.awt.Container | public Component add(Component comp)(Code)(Java Doc) public Component add(String name, Component comp)(Code)(Java Doc) public Component add(Component comp, int index)(Code)(Java Doc) public void add(Component comp, Object constraints)(Code)(Java Doc) public void add(Component comp, Object constraints, int index)(Code)(Java Doc) public synchronized void addContainerListener(ContainerListener l)(Code)(Java Doc) protected void addImpl(Component comp, Object constraints, int index)(Code)(Java Doc) public void addNotify()(Code)(Java Doc) public int countComponents()(Code)(Java Doc) public void deliverEvent(Event e)(Code)(Java Doc) public void doLayout()(Code)(Java Doc) boolean eventEnabled(AWTEvent e)(Code)(Java Doc) public float getAlignmentX()(Code)(Java Doc) public float getAlignmentY()(Code)(Java Doc) public Component getComponent(int n)(Code)(Java Doc) public Component getComponentAt(int x, int y)(Code)(Java Doc) public Component getComponentAt(Point p)(Code)(Java Doc) public int getComponentCount()(Code)(Java Doc) public Component[] getComponents()(Code)(Java Doc) public Insets getInsets()(Code)(Java Doc) public LayoutManager getLayout()(Code)(Java Doc) public Dimension getMaximumSize()(Code)(Java Doc) public Dimension getMinimumSize()(Code)(Java Doc) public Dimension getPreferredSize()(Code)(Java Doc) Window getWindow()(Code)(Java Doc) public Insets insets()(Code)(Java Doc) public void invalidate()(Code)(Java Doc) public boolean isAncestorOf(Component c)(Code)(Java Doc) public void layout()(Code)(Java Doc) void lightweightPrint(Graphics g)(Code)(Java Doc) public void list(PrintStream out, int indent)(Code)(Java Doc) public void list(PrintWriter out, int indent)(Code)(Java Doc) public Component locate(int x, int y)(Code)(Java Doc) public Dimension minimumSize()(Code)(Java Doc) void nextFocus(Component base)(Code)(Java Doc) public void paint(Graphics g)(Code)(Java Doc) public void paintComponents(Graphics g)(Code)(Java Doc) protected String paramString()(Code)(Java Doc) public Dimension preferredSize()(Code)(Java Doc) public void print(Graphics g)(Code)(Java Doc) public void printComponents(Graphics g)(Code)(Java Doc) protected void processContainerEvent(ContainerEvent e)(Code)(Java Doc) protected void processEvent(AWTEvent e)(Code)(Java Doc) public void remove(int index)(Code)(Java Doc) public void remove(Component comp)(Code)(Java Doc) public void removeAll()(Code)(Java Doc) public synchronized void removeContainerListener(ContainerListener l)(Code)(Java Doc) public void removeNotify()(Code)(Java Doc) public void setLayout(LayoutManager mgr)(Code)(Java Doc) void transferFocus(Component base)(Code)(Java Doc) public void update(Graphics g)(Code)(Java Doc) public void validate()(Code)(Java Doc) protected void validateTree()(Code)(Java Doc)
|
Methods inherited from java.awt.Component | public boolean action(Event evt, Object what)(Code)(Java Doc) public synchronized void add(PopupMenu popup)(Code)(Java Doc) public synchronized void addComponentListener(ComponentListener l)(Code)(Java Doc) public synchronized void addFocusListener(FocusListener l)(Code)(Java Doc) public synchronized void addKeyListener(KeyListener l)(Code)(Java Doc) public synchronized void addMouseListener(MouseListener l)(Code)(Java Doc) public synchronized void addMouseMotionListener(MouseMotionListener l)(Code)(Java Doc) public void addNotify()(Code)(Java Doc) boolean areInputMethodsEnabled()(Code)(Java Doc) public Rectangle bounds()(Code)(Java Doc) final void checkEnableNewEventsOnly(Object listener)(Code)(Java Doc) public int checkImage(Image image, ImageObserver observer)(Code)(Java Doc) public int checkImage(Image image, int width, int height, ImageObserver observer)(Code)(Java Doc) protected AWTEvent coalesceEvents(AWTEvent existingEvent, AWTEvent newEvent)(Code)(Java Doc) String constructComponentName()(Code)(Java Doc) public boolean contains(int x, int y)(Code)(Java Doc) public boolean contains(Point p)(Code)(Java Doc) public Image createImage(ImageProducer producer)(Code)(Java Doc) public Image createImage(int width, int height)(Code)(Java Doc) ComponentXWindow createXWindow()(Code)(Java Doc) public void deliverEvent(Event e)(Code)(Java Doc) public void disable()(Code)(Java Doc) final protected void disableEvents(long eventsToDisable)(Code)(Java Doc) final public void dispatchEvent(AWTEvent e)(Code)(Java Doc) void dispatchEventImpl(AWTEvent e)(Code)(Java Doc) public void doLayout()(Code)(Java Doc) public void enable()(Code)(Java Doc) public void enable(boolean b)(Code)(Java Doc) final protected synchronized void enableEvents(long eventsToEnable)(Code)(Java Doc) boolean eventEnabled(AWTEvent e)(Code)(Java Doc) Component findFocusDelegate(Container container)(Code)(Java Doc) public float getAlignmentX()(Code)(Java Doc) public float getAlignmentY()(Code)(Java Doc) public Color getBackground()(Code)(Java Doc) public Rectangle getBounds()(Code)(Java Doc) public ColorModel getColorModel()(Code)(Java Doc) public Component getComponentAt(int x, int y)(Code)(Java Doc) public Component getComponentAt(Point p)(Code)(Java Doc) public Cursor getCursor()(Code)(Java Doc) Component getFocusDelegate()(Code)(Java Doc) public Font getFont()(Code)(Java Doc) Component getFontAndColorDelegate()(Code)(Java Doc) public FontMetrics getFontMetrics(Font font)(Code)(Java Doc) public Color getForeground()(Code)(Java Doc) public Graphics getGraphics()(Code)(Java Doc) InputContext getInputContext()(Code)(Java Doc) public Locale getLocale()(Code)(Java Doc) public Point getLocation()(Code)(Java Doc) public Point getLocationOnScreen()(Code)(Java Doc) public Dimension getMaximumSize()(Code)(Java Doc) public Dimension getMinimumSize()(Code)(Java Doc) public String getName()(Code)(Java Doc) Container getNativeContainer()(Code)(Java Doc) public Container getParent()(Code)(Java Doc) public Dimension getPreferredSize()(Code)(Java Doc) public Dimension getSize()(Code)(Java Doc) public Toolkit getToolkit()(Code)(Java Doc) final public Object getTreeLock()(Code)(Java Doc) public boolean gotFocus(Event evt, Object what)(Code)(Java Doc) public boolean handleEvent(Event evt)(Code)(Java Doc) public void hide()(Code)(Java Doc) public boolean imageUpdate(Image img, int flags, int x, int y, int w, int h)(Code)(Java Doc) public boolean inside(int x, int y)(Code)(Java Doc) public void invalidate()(Code)(Java Doc) static void invokeAndWait(Runnable runnable)(Code)(Java Doc) public boolean isDisplayable()(Code)(Java Doc) public boolean isEnabled()(Code)(Java Doc) public boolean isFocusTraversable()(Code)(Java Doc) public boolean isLightweight()(Code)(Java Doc) boolean isLightweightWhenDisplayable()(Code)(Java Doc) public boolean isOpaque()(Code)(Java Doc) public boolean isShowing()(Code)(Java Doc) public boolean isValid()(Code)(Java Doc) public boolean isVisible()(Code)(Java Doc) public boolean keyDown(Event evt, int key)(Code)(Java Doc) public boolean keyUp(Event evt, int key)(Code)(Java Doc) public void layout()(Code)(Java Doc) void lightweightPrint(Graphics g)(Code)(Java Doc) public void list()(Code)(Java Doc) public void list(PrintStream out)(Code)(Java Doc) public void list(PrintStream out, int indent)(Code)(Java Doc) public void list(PrintWriter out)(Code)(Java Doc) public void list(PrintWriter out, int indent)(Code)(Java Doc) public Component locate(int x, int y)(Code)(Java Doc) public Point location()(Code)(Java Doc) public boolean lostFocus(Event evt, Object what)(Code)(Java Doc) public Dimension minimumSize()(Code)(Java Doc) public boolean mouseDown(Event evt, int x, int y)(Code)(Java Doc) public boolean mouseDrag(Event evt, int x, int y)(Code)(Java Doc) public boolean mouseEnter(Event evt, int x, int y)(Code)(Java Doc) public boolean mouseExit(Event evt, int x, int y)(Code)(Java Doc) public boolean mouseMove(Event evt, int x, int y)(Code)(Java Doc) public boolean mouseUp(Event evt, int x, int y)(Code)(Java Doc) public void move(int x, int y)(Code)(Java Doc) public void nextFocus()(Code)(Java Doc) public void paint(Graphics g)(Code)(Java Doc) public void paintAll(Graphics g)(Code)(Java Doc) protected String paramString()(Code)(Java Doc) public boolean postEvent(Event e)(Code)(Java Doc) public Dimension preferredSize()(Code)(Java Doc) public boolean prepareImage(Image image, ImageObserver observer)(Code)(Java Doc) public boolean prepareImage(Image image, int width, int height, ImageObserver observer)(Code)(Java Doc) public void print(Graphics g)(Code)(Java Doc) public void printAll(Graphics g)(Code)(Java Doc) protected void processComponentEvent(ComponentEvent e)(Code)(Java Doc) protected void processEvent(AWTEvent e)(Code)(Java Doc) protected void processFocusEvent(FocusEvent e)(Code)(Java Doc) protected void processKeyEvent(KeyEvent e)(Code)(Java Doc) protected void processMouseEvent(MouseEvent e)(Code)(Java Doc) protected void processMouseMotionEvent(MouseEvent e)(Code)(Java Doc) public synchronized void remove(MenuComponent popup)(Code)(Java Doc) public synchronized void removeComponentListener(ComponentListener l)(Code)(Java Doc) public synchronized void removeFocusListener(FocusListener l)(Code)(Java Doc) public synchronized void removeKeyListener(KeyListener l)(Code)(Java Doc) public synchronized void removeMouseListener(MouseListener l)(Code)(Java Doc) public synchronized void removeMouseMotionListener(MouseMotionListener l)(Code)(Java Doc) public void removeNotify()(Code)(Java Doc) public void repaint()(Code)(Java Doc) public void repaint(long tm)(Code)(Java Doc) public void repaint(int x, int y, int width, int height)(Code)(Java Doc) public void repaint(long tm, int x, int y, int width, int height)(Code)(Java Doc) public void requestFocus()(Code)(Java Doc) public void reshape(int x, int y, int width, int height)(Code)(Java Doc) public void resize(int width, int height)(Code)(Java Doc) public void resize(Dimension d)(Code)(Java Doc) public void setBackground(Color c)(Code)(Java Doc) public void setBounds(int x, int y, int width, int height)(Code)(Java Doc) public void setBounds(Rectangle r)(Code)(Java Doc) public synchronized void setCursor(Cursor cursor)(Code)(Java Doc) public void setEnabled(boolean b)(Code)(Java Doc) public void setFont(Font f)(Code)(Java Doc) public void setForeground(Color c)(Code)(Java Doc) public void setLocale(Locale l)(Code)(Java Doc) public void setLocation(int x, int y)(Code)(Java Doc) public void setLocation(Point p)(Code)(Java Doc) public void setName(String name)(Code)(Java Doc) public void setSize(int width, int height)(Code)(Java Doc) public void setSize(Dimension d)(Code)(Java Doc) public void setVisible(boolean b)(Code)(Java Doc) public void show()(Code)(Java Doc) public void show(boolean b)(Code)(Java Doc) public Dimension size()(Code)(Java Doc) public String toString()(Code)(Java Doc) public void transferFocus()(Code)(Java Doc) public void update(Graphics g)(Code)(Java Doc) public void validate()(Code)(Java Doc)
|
|
|