Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

Class java.awt.swing.JInternalFrame

java.lang.Object
    |
    +----java.awt.Component
            |
            +----java.awt.Container
                    |
                    +----java.awt.swing.JComponent
                            |
                            +----java.awt.swing.JInternalFrame

public class JInternalFrame
extends JComponent
implements Accessible, MouseListener, MouseMotionListener, WindowConstants, RootPaneContainer, ComponentListener
A lightweight object that provides many of the features of a native frame, including dragging, closing, becoming an icon, resizing, title display, and support for a menu bar. Generally, you will create an instance and add it to a JDesktopPane.

The JInternalFrame has a 'contentPane' that is used to describe the area of the component where normal child components should be placed. So, if you wanted build a JInternalFrame that had a number of buttons arranged through a BorderLayout object, you might do something like:

    JComponent c = frame.getContentPane();
    c.setLayoutManager(new BorderLayout());
    c.add(new JButton(), BorderLayout.NORTH);
    c.add(new JButton(), BorderLayout.CENTER);
 

 

Please see the JRootPane documentation for a complete description of the contentPane(), glassPane(), and layeredPane() components.

Warning: serialized objects of this class will not be compatible with future swing releases. The current serialization support is appropriate for short term storage or RMI between Swing1.0 applications. It will not be possible to load serialized Swing1.0 objects with future releases of Swing. The JDK1.2 release of Swing will be the compatibility baseline for the serialized form of Swing objects.

See Also:
JDesktopPane, JDesktopIcon, DesktopManager, JRootPane

Inner Class Summary
 JInternalFrame.AccessibleJInternalFrame
The class used to obtain the accessible role for this object.
static   JInternalFrame.JDesktopIcon
This component represents an iconified version of a JInternalFrame.
 
Inner classes inherited from class java.awt.swing.JComponent
 JComponent.AccessibleJComponent
 

Field Summary
boolean  closable
 
static String  CONTENT_PANE_PROPERTY
Bound property name.
JInternalFrame.JDesktopIcon  desktopIcon
 
Icon  frameIcon
 
static String  GLASS_PANE_PROPERTY
Bound property name.
boolean  iconable
 
static String  IS_CLOSED_PROPERTY
Constrained property name indicating that the frame is closed.
static String  IS_ICON_PROPERTY
Constrained property name indicating that the frame is iconified.
static String  IS_MAXIMUM_PROPERTY
Constrained property name indicating that the frame is maximized.
static String  IS_SELECTED_PROPERTY
Constrained property name indicated that this frame has selected status.
boolean  isClosed
 
boolean  isIcon
 
boolean  isMaximum
 
boolean  isSelected
 
static String  LAYERED_PANE_PROPERTY
Bound property name.
boolean  maximizable
 
static String  MENU_BAR_PROPERTY
Bound property name.
boolean  resizable
 
static String  ROOT_PANE_PROPERTY
Bound property name.
JRootPane  rootPane
 
boolean  rootPaneCheckingEnabled
 
String  title
 
static String  TITLE_PROPERTY
Bound property name.
 
Fields inherited from class java.awt.swing.JComponent
 accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
 BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 

Constructor Summary
 JInternalFrame()
Creates a JInternalFrame with no title, and all boolean setting false.
 JInternalFrame(String title)
Creates a JInternalFrame with title, and all boolean setting false.
 JInternalFrame(String title, boolean resizable)
 
 JInternalFrame(String title, boolean resizable, boolean closable)
 
 JInternalFrame(String title, boolean resizable, boolean closable, boolean maximizable)
 
 JInternalFrame(String title, boolean resizable, boolean closable, boolean maximizable, boolean iconifiable)
Primitive creation method that sets the appropriate values.
 

Method Summary
void  addImpl(Component comp, Object constraints, int index)
By default, children may not be added directly to a this component, they must be added to its contentPane instead.
void  addInternalFrameListener(InternalFrameListener l)
Adds the specified internal frame listener to receive internal frame events from this internal frame.
void  componentHidden(ComponentEvent e)
 
void  componentMoved(ComponentEvent e)
 
void  componentResized(ComponentEvent e)
Invoked when a maximized JInternalFrame's parent's size changes.
void  componentShown(ComponentEvent e)
 
JRootPane  createRootPane()
 
void  dispose()
Disposes of this internal frame.
AccessibleContext  getAccessibleContext()
Get the AccessibleContext associated with this JComponent
Color  getBackground()
Get the background color of this object.
Container  getContentPane()
 
int  getDefaultCloseOperation()
Returns the default operation which occurs when the user initiates a "close" on this window.
JInternalFrame.JDesktopIcon  getDesktopIcon()
Returns the JDesktopIcon used when this JInternalFrame is iconified.
JDesktopPane  getDesktopPane()
Convenience method that searchs the anscestor heirarchy for a JDesktop instance.
Color  getForeground()
Get the foreground color of this object.
Icon  getFrameIcon()
 
Component  getGlassPane()
 
int  getLayer()
Convenience method for getting the layer attribute of this component.
JLayeredPane  getLayeredPane()
 
JMenuBar  getMenuBar()
Returns the current JMenuBar for this JInternalFrame, or null if no menu bar has been set.
JRootPane  getRootPane()
 
String  getTitle()
Returns the current JInternalFrame title.
java.awt.swing.plaf.InternalFrameUI  getUI()
 
String  getUIClassID()
 
String  getWarningString()
Gets the warning string that is displayed with this window.
boolean  isClosable()
Returns whether this JInternalFrame be closed by some user action.
boolean  isClosed()
 
boolean  isIcon()
 
boolean  isIconifiable()
 
boolean  isMaximizable()
 
boolean  isMaximum()
 
boolean  isResizable()
 
boolean  isRootPaneCheckingEnabled()
 
boolean  isSelected()
 
void  mouseClicked(MouseEvent e)
 
void  mouseDragged(MouseEvent e)
 
void  mouseEntered(MouseEvent e)
 
void  mouseExited(MouseEvent e)
 
void  mouseMoved(MouseEvent e)
 
void  mousePressed(MouseEvent e)
 
void  mouseReleased(MouseEvent e)
 
void  moveToBack()
Convenience method that moves this component to position -1 if it's parent is a JLayeredPane.
void  moveToFront()
Convenience method that moves this component to position 0 if it's parent is a JLayeredPane.
void  pack()
Causes subcomponents of this JInternalFrame to be laid out at their preferred size.
void  processEvent(AWTEvent e)
Processes events on this internal frame.
void  removeInternalFrameListener(InternalFrameListener l)
Removes the specified internal frame listener so that it no longer receives internal frame events from this internal frame.
void  reshape(int x, int y, int width, int height)
Moves and resizes this component.
void  setBackground(Color c)
Set the background color of this object.
void  setClosable(boolean b)
Set that this JInternalFrame can be closed by some user action.
void  setClosed(boolean b)
Calling this method with true, will cause the frame to close.
void  setContentPane(Container c)
Sets this JInternalFrame's content pane.
void  setDefaultCloseOperation(int operation)
Sets the operation which will happen by default when the user initiates a "close" on this window.
void  setDesktopIcon(JInternalFrame.JDesktopIcon d)
Sets the JDesktopIcon associated with this JInternalFrame.
void  setForeground(Color c)
Set the foreground color of this object.
void  setFrameIcon(Icon icon)
Sets an image to be displayed in the titlebar of the frame.
void  setGlassPane(Component glass)
 
void  setIcon(boolean b)
Setting this property to true will iconify the frame, false will deiconify.
void  setIconifiable(boolean b)
Set that the JInternalFrame can be made an icon by some user action.
void  setLayer(Integer layer)
Convenience method for setting the layer attribute of this component.
void  setLayeredPane(JLayeredPane layered)
 
void  setLayout(LayoutManager manager)
By default the layout of this component may not be set, the layout of its contentPane should be set instead.
void  setMaximizable(boolean b)
Set that the JInternalFrame can be maximized by some user action.
void  setMaximum(boolean b)
Setting this property to true will maximize the frame, false will minimize.
void  setMenuBar(JMenuBar m)
Sets the JMenuBar for this JInternalFrame.
void  setResizable(boolean b)
Set that the JInternalFrame resizable by some user action.
void  setRootPane(JRootPane root)
Set the rootPane property.
void  setRootPaneCheckingEnabled(boolean enabled)
If true then calls to add() and setLayout() will cause an exception to be thrown.
void  setSelected(boolean selected)
A JInternalFrame normally draws it's title bar differently if it is the selected frame.
void  setTitle(String title)
Sets the JInternalFrame title.
void  setUI(java.awt.swing.plaf.InternalFrameUI ui)
Sets the UI delegate for this JInternalFrame.
void  setVisible(boolean b)
Set the visible state of the object.
void  show()
Shows this internal frame, and brings it to the front.
void  toBack()
Sends this internal frame to the back.
void  toFront()
Brings this internal frame to the front.
void  updateUI()
 
 
Methods inherited from class java.awt.swing.JComponent
 addAncestorListener, addNotify, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInsets, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getUIClassID, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, processComponentKeyEvent, processFocusEvent, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setBounds, setDebugGraphicsOptions, setDoubleBuffered, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVisible, unregisterKeyboardAction, update, updateUI
 
Methods inherited from class java.awt.Container
 add, add, add, add, add, addContainerListener, addImpl, addNotify, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setLayout, update, validate, validateTree
 
Methods inherited from class java.awt.Component
 action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getColorModel, getComponentAt, getComponentAt, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPeer, getPreferredSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate
 
Methods inherited from class java.lang.Object
 clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rootPane

protected JRootPane rootPane
See Also:
getRootPane, setRootPane

rootPaneCheckingEnabled

protected boolean rootPaneCheckingEnabled
See Also:
isRootPaneCheckingEnabled, setRootPaneCheckingEnabled

closable

protected boolean closable

isClosed

protected boolean isClosed

maximizable

protected boolean maximizable

isMaximum

protected boolean isMaximum

iconable

protected boolean iconable

isIcon

protected boolean isIcon

resizable

protected boolean resizable

isSelected

protected boolean isSelected

frameIcon

protected Icon frameIcon

title

protected String title

desktopIcon

protected JInternalFrame.JDesktopIcon desktopIcon

CONTENT_PANE_PROPERTY

public static final String CONTENT_PANE_PROPERTY
Bound property name.

MENU_BAR_PROPERTY

public static final String MENU_BAR_PROPERTY
Bound property name.

TITLE_PROPERTY

public static final String TITLE_PROPERTY
Bound property name.

LAYERED_PANE_PROPERTY

public static final String LAYERED_PANE_PROPERTY
Bound property name.

ROOT_PANE_PROPERTY

public static final String ROOT_PANE_PROPERTY
Bound property name.

GLASS_PANE_PROPERTY

public static final String GLASS_PANE_PROPERTY
Bound property name.

IS_SELECTED_PROPERTY

public static final String IS_SELECTED_PROPERTY
Constrained property name indicated that this frame has selected status.

IS_CLOSED_PROPERTY

public static final String IS_CLOSED_PROPERTY
Constrained property name indicating that the frame is closed.

IS_MAXIMUM_PROPERTY

public static final String IS_MAXIMUM_PROPERTY
Constrained property name indicating that the frame is maximized.

IS_ICON_PROPERTY

public static final String IS_ICON_PROPERTY
Constrained property name indicating that the frame is iconified.
Constructor Detail

JInternalFrame

public JInternalFrame()
Creates a JInternalFrame with no title, and all boolean setting false.

JInternalFrame

public JInternalFrame(String title)
Creates a JInternalFrame with title, and all boolean setting false.

JInternalFrame

public JInternalFrame(String title,
                      boolean resizable)

JInternalFrame

public JInternalFrame(String title,
                      boolean resizable,
                      boolean closable)

JInternalFrame

public JInternalFrame(String title,
                      boolean resizable,
                      boolean closable,
                      boolean maximizable)

JInternalFrame

public JInternalFrame(String title,
                      boolean resizable,
                      boolean closable,
                      boolean maximizable,
                      boolean iconifiable)
Primitive creation method that sets the appropriate values.
Method Detail

createRootPane

protected JRootPane createRootPane()

getUI

public java.awt.swing.plaf.InternalFrameUI getUI()

setUI

public void setUI(java.awt.swing.plaf.InternalFrameUI ui)
Sets the UI delegate for this JInternalFrame.

updateUI

public void updateUI()
Overrides:
updateUI in class JComponent

getUIClassID

public String getUIClassID()
Returns:
"InternalFrameUI"
Overrides:
getUIClassID in class JComponent
See Also:
getUIClassID, getUI

isRootPaneCheckingEnabled

protected boolean isRootPaneCheckingEnabled()
Returns:
true if add and setLayout should be checked
See Also:
addImpl, setLayout, setRootPaneCheckingEnabled

setRootPaneCheckingEnabled

protected void setRootPaneCheckingEnabled(boolean enabled)
If true then calls to add() and setLayout() will cause an exception to be thrown.
See Also:
addImpl, setLayout, isRootPaneCheckingEnabled

addImpl

protected void addImpl(Component comp,
                       Object constraints,
                       int index)
By default, children may not be added directly to a this component, they must be added to its contentPane instead. For example:
 thisComponent.getContentPane().add(child)
 
An attempt to add to directly to this component will cause an runtime exception to be thrown. Subclasses can disable this behavior.
Throws:
Error - if called with rootPaneChecking true
Overrides:
addImpl in class Container
See Also:
setRootPaneCheckingEnabled

setLayout

public void setLayout(LayoutManager manager)
By default the layout of this component may not be set, the layout of its contentPane should be set instead. For example:
 thiComponent.getContentPane().setLayout(new BorderLayout())
 
An attempt to set the layout of this component will cause an runtime exception to be thrown. Subclasses can disable this behavior.
Throws:
Error - if called with rootPaneChecking true
Overrides:
setLayout in class Container
See Also:
setRootPaneCheckingEnabled

getMenuBar

public JMenuBar getMenuBar()
Returns the current JMenuBar for this JInternalFrame, or null if no menu bar has been set.
See Also:
setMenuBar

setMenuBar

public void setMenuBar(JMenuBar m)
Sets the JMenuBar for this JInternalFrame.
See Also:
getMenuBar

getContentPane

public Container getContentPane()
Implements:
getContentPane in interface RootPaneContainer
See Also:
getContentPane

setContentPane

public void setContentPane(Container c)
Sets this JInternalFrame's content pane.
Implements:
setContentPane in interface RootPaneContainer
See Also:
getContentPane

getLayeredPane

public JLayeredPane getLayeredPane()
Implements:
getLayeredPane in interface RootPaneContainer
See Also:
setLayeredPane

setLayeredPane

public void setLayeredPane(JLayeredPane layered)
Implements:
setLayeredPane in interface RootPaneContainer
See Also:
setLayeredPane

getGlassPane

public Component getGlassPane()
Implements:
getGlassPane in interface RootPaneContainer
See Also:
setGlassPane

setGlassPane

public void setGlassPane(Component glass)
Implements:
setGlassPane in interface RootPaneContainer
See Also:
getGlassPane

getRootPane

public JRootPane getRootPane()
Implements:
getRootPane in interface RootPaneContainer
Overrides:
getRootPane in class JComponent
See Also:
getRootPane

setRootPane

protected void setRootPane(JRootPane root)
Set the rootPane property. This method is called by the constructor.

setVisible

public void setVisible(boolean b)
Set the visible state of the object.
Parameters:
b - if true, shows this object; otherwise, hides it
Overrides:
setVisible in class JComponent

setClosable

public void setClosable(boolean b)
Set that this JInternalFrame can be closed by some user action.

isClosable

public boolean isClosable()
Returns whether this JInternalFrame be closed by some user action.

isClosed

public boolean isClosed()

setClosed

public void setClosed(boolean b) throws PropertyVetoException
Calling this method with true, will cause the frame to close.
Throws:
PropertyVetoException - when the attempt to set the property is vetoed by the receiver.

setResizable

public void setResizable(boolean b)
Set that the JInternalFrame resizable by some user action.

isResizable

public boolean isResizable()

setIconifiable

public void setIconifiable(boolean b)
Set that the JInternalFrame can be made an icon by some user action.

isIconifiable

public boolean isIconifiable()

isIcon

public boolean isIcon()

setIcon

public void setIcon(boolean b) throws PropertyVetoException
Setting this property to true will iconify the frame, false will deiconify.
Throws:
PropertyVetoException - when the attempt to set the property is vetoed by the receiver.

setMaximizable

public void setMaximizable(boolean b)
Set that the JInternalFrame can be maximized by some user action.

isMaximizable

public boolean isMaximizable()

isMaximum

public boolean isMaximum()

setMaximum

public void setMaximum(boolean b) throws PropertyVetoException
Setting this property to true will maximize the frame, false will minimize.
Throws:
PropertyVetoException - when the attempt to set the property is vetoed by the receiver.

getTitle

public String getTitle()
Returns the current JInternalFrame title.
See Also:
setTitle

setTitle

public void setTitle(String title)
Sets the JInternalFrame title.
See Also:
getTitle

setSelected

public void setSelected(boolean selected) throws PropertyVetoException
A JInternalFrame normally draws it's title bar differently if it is the selected frame. This normally indicates that this internalFrame has focus for the user.
Throws:
PropertyVetoException - when the attempt to set the property is vetoed by the receiver.

isSelected

public boolean isSelected()

setFrameIcon

public void setFrameIcon(Icon icon)
Sets an image to be displayed in the titlebar of the frame. Do not confuse this with the desktopIcon object, which describes what is displayed in the JDesktop when the frame is iconified.

getFrameIcon

public Icon getFrameIcon()

getBackground

public Color getBackground()
Get the background color of this object.
Returns:
the background color, if supported, of the object; otherwise, null
Overrides:
getBackground in class Component

setBackground

public void setBackground(Color c)
Set the background color of this object. (For transparency, see isOpaque.)
Parameters:
c - the new Color for the background
Overrides:
setBackground in class Component
See Also:
isOpaque

getForeground

public Color getForeground()
Get the foreground color of this object.
Returns:
the foreground color, if supported, of the object; otherwise, null
Overrides:
getForeground in class Component

setForeground

public void setForeground(Color c)
Set the foreground color of this object.
Parameters:
c - the new Color for the foreground
Overrides:
setForeground in class Component

moveToFront

public void moveToFront()
Convenience method that moves this component to position 0 if it's parent is a JLayeredPane.

moveToBack

public void moveToBack()
Convenience method that moves this component to position -1 if it's parent is a JLayeredPane.

setLayer

public void setLayer(Integer layer)
Convenience method for setting the layer attribute of this component.

getLayer

public int getLayer()
Convenience method for getting the layer attribute of this component.

getDesktopPane

public JDesktopPane getDesktopPane()
Convenience method that searchs the anscestor heirarchy for a JDesktop instance. If JInternalFrame finds none, the desktopIcon tree is searched.

setDesktopIcon

public void setDesktopIcon(JInternalFrame.JDesktopIcon d)
Sets the JDesktopIcon associated with this JInternalFrame.
See Also:
getDesktopIcon

getDesktopIcon

public JInternalFrame.JDesktopIcon getDesktopIcon()
Returns the JDesktopIcon used when this JInternalFrame is iconified.
See Also:
setDesktopIcon

reshape

public void reshape(int x,
                    int y,
                    int width,
                    int height)
Moves and resizes this component. Unlike other components, this implementation also forces re-layout, so that frame decorations such as the title bar are always redisplayed.
Overrides:
reshape in class JComponent

addInternalFrameListener

public void addInternalFrameListener(InternalFrameListener l)
Adds the specified internal frame listener to receive internal frame events from this internal frame.
Parameters:
l - the internal frame listener

removeInternalFrameListener

public void removeInternalFrameListener(InternalFrameListener l)
Removes the specified internal frame listener so that it no longer receives internal frame events from this internal frame.
Parameters:
l - the internal frame listener

processEvent

protected void processEvent(AWTEvent e)
Processes events on this internal frame. If the event has a InternalFrameEvent id, it notifies its internalFrameListener, else it invokes its superclass's processEvent.
Parameters:
e - the event
Overrides:
processEvent in class Container

setDefaultCloseOperation

public void setDefaultCloseOperation(int operation)
Sets the operation which will happen by default when the user initiates a "close" on this window. The possible choices are:

  • DO_NOTHING_ON_CLOSE - do not do anything - require the program to handle the operation in the windowClosing method of a registered InternalFrameListener object.
  • HIDE_ON_CLOSE - automatically hide the window after invoking any registered InternalFrameListener objects
  • DISPOSE_ON_CLOSE - automatically hide and dispose the window after invoking any registered InternalFrameListener objects

The value is set to HIDE_ON_CLOSE by default.

See Also:
addInternalFrameListener, getDefaultCloseOperation

getDefaultCloseOperation

public int getDefaultCloseOperation()
Returns the default operation which occurs when the user initiates a "close" on this window.
See Also:
setDefaultCloseOperation

pack

public void pack()
Causes subcomponents of this JInternalFrame to be laid out at their preferred size.
See Also:
pack

show

public void show()
Shows this internal frame, and brings it to the front.

If this window is not yet visible, show makes it visible. If this window is already visible, then this method brings it to the front.

Overrides:
show in class Component
See Also:
show, toFront, setVisible

dispose

public void dispose()
Disposes of this internal frame.

toFront

public void toFront()
Brings this internal frame to the front.
See Also:
toFront, moveToFront

toBack

public void toBack()
Sends this internal frame to the back. Places this internal frame at the bottom of the stacking order and makes the corresponding adjustment to other visible windows.
See Also:
toBack, moveToBack

getWarningString

public final String getWarningString()
Gets the warning string that is displayed with this window. Since an internal frame is always secure (since it's fully contained within a window which might need a warning string) this method always returns null.
Returns:
null.
See Also:
getWarningString

mousePressed

public void mousePressed(MouseEvent e)
Implements:
mousePressed in interface MouseListener

mouseEntered

public void mouseEntered(MouseEvent e)
Implements:
mouseEntered in interface MouseListener

mouseMoved

public void mouseMoved(MouseEvent e)
Implements:
mouseMoved in interface MouseMotionListener

mouseExited

public void mouseExited(MouseEvent e)
Implements:
mouseExited in interface MouseListener

mouseClicked

public void mouseClicked(MouseEvent e)
Implements:
mouseClicked in interface MouseListener

mouseReleased

public void mouseReleased(MouseEvent e)
Implements:
mouseReleased in interface MouseListener

mouseDragged

public void mouseDragged(MouseEvent e)
Implements:
mouseDragged in interface MouseMotionListener

componentResized

public void componentResized(ComponentEvent e)
Invoked when a maximized JInternalFrame's parent's size changes.
Implements:
componentResized in interface ComponentListener

componentMoved

public void componentMoved(ComponentEvent e)
Implements:
componentMoved in interface ComponentListener

componentShown

public void componentShown(ComponentEvent e)
Implements:
componentShown in interface ComponentListener

componentHidden

public void componentHidden(ComponentEvent e)
Implements:
componentHidden in interface ComponentListener

getAccessibleContext

public AccessibleContext getAccessibleContext()
Get the AccessibleContext associated with this JComponent
Implements:
getAccessibleContext in interface Accessible
Returns:
the AccessibleContext of this JComponent
Overrides:
getAccessibleContext in class JComponent

Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

Submit a bug or feature
Submit comments/suggestions about new javadoc look.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.