Ja.NET Standard Edition 5.0

Documentation API Specification

Contents

JFrame Class Reference

Inherits java::awt::Frame, javax::swing::WindowConstants, javax::accessibility::Accessible, and javax::swing::RootPaneContainer.

Inherited by IMJFrame.

List of all members.


Detailed Description

JFrame

Implementation Notes:


Public Member Functions

 JFrame (final String title, final GraphicsConfiguration gc)
 Constructs a new frame in the specified GraphicsConfiguration and the specified title.
 JFrame (final String title) throws HeadlessException
 Constructs a new frame with the specified title which is initially invisible.
 JFrame (final GraphicsConfiguration gc)
 Constructs a new frame in the specified GraphicsConfiguration and an empty title.
 JFrame () throws HeadlessException
 Constructs a new frame with an empty title which is initially invisible.
JRootPane getRootPane ()
 Get rootPane property.
void setJMenuBar (final JMenuBar menuBar)
 Sets the menu bar for the frame.
JMenuBar getJMenuBar ()
 Returns the menu bar for the frame.
void setLayeredPane (final JLayeredPane layeredPane)
 Sets layeredPane property.
JLayeredPane getLayeredPane ()
 Returns layeredPane property.
AccessibleContext getAccessibleContext ()
 Returns the accessible context for the frame.
void setLayout (final LayoutManager layout)
void update (final Graphics g)
 Just calls paint(g).
void setContentPane (final Container contentPane)
 Sets contentPane property.
Container getContentPane ()
 Returns the contentPane property.
void setGlassPane (final Component glassPane)
 Set glassPane property.
void remove (final Component comp)
Component getGlassPane ()
 Returns glassPane property.
void setDefaultCloseOperation (final int operation)
 Sets defaultCloseOperation property.
int getDefaultCloseOperation ()
 Returns defaultCloseOperation value.
void setIconImage (final Image image)

Static Public Member Functions

static void setDefaultLookAndFeelDecorated (final boolean defaultLookAndFeelDecorated)
static boolean isDefaultLookAndFeelDecorated ()

Static Public Attributes

static final int EXIT_ON_CLOSE = 3

Protected Member Functions

void addImpl (final Component comp, final Object constraints, final int index)
void setRootPane (final JRootPane root)
 Set rootPane property.
JRootPane createRootPane ()
 Called by the constructors to create the default rootPane property.
String paramString ()
 Returns string representation of this frame.
void processWindowEvent (final WindowEvent e)
 Implements actions depending on defaultCloseOperation property.
void setRootPaneCheckingEnabled (final boolean enabled)
 Sets rootPaneCheckingEnabled.
boolean isRootPaneCheckingEnabled ()
 Returns rootPaneCheckingEnabled value.
void frameInit ()
 Called by the constructors to init JFrame.

Protected Attributes

JRootPane rootPane
boolean rootPaneCheckingEnabled
AccessibleContext accessibleContext

Static Package Functions

static Frame getSharedOwner ()
 Returns the frame that is used as a default shared owner for JDialog and JWindow.

Private Attributes

int defaultCloseOperation = HIDE_ON_CLOSE

Static Private Attributes

static final long serialVersionUID = -1026528232454752719L
static boolean defaultLookAndFeelDecorated
static Frame sharedFrame

Classes

class  AccessibleJFrame
 This class implements accessibility support for JFrame. More...

Constructor & Destructor Documentation

JFrame ( final String  title,
final GraphicsConfiguration  gc 
)

Constructs a new frame in the specified GraphicsConfiguration and the specified title.

Parameters:
title - title of the frame; if title is null, an empty title is assumed
gc - the GraphicsConfiguration to construct the frame; if gc is null, the system default GraphicsConfiguration is assumed

JFrame ( final String  title  )  throws HeadlessException

Constructs a new frame with the specified title which is initially invisible.

Parameters:
title - title of the frame; if title is null, an empty title is assumed
Exceptions:
HeadlessException - when GraphicsEnvironment.isHeadless() returns true

JFrame ( final GraphicsConfiguration  gc  ) 

Constructs a new frame in the specified GraphicsConfiguration and an empty title.

Parameters:
gc - the GraphicsConfiguration to construct the frame; if gc is null, the system default GraphicsConfiguration is assumed

JFrame (  )  throws HeadlessException

Constructs a new frame with an empty title which is initially invisible.

Exceptions:
HeadlessException - when GraphicsEnvironment.isHeadless() returns true


Member Function Documentation

void addImpl ( final Component  comp,
final Object  constraints,
final int  index 
) [protected]

void setRootPane ( final JRootPane  root  )  [protected]

Set rootPane property.

Parameters:
root - new rootPane property value

JRootPane getRootPane (  ) 

Get rootPane property.

Returns:
rootPane property

Implements RootPaneContainer.

JRootPane createRootPane (  )  [protected]

Called by the constructors to create the default rootPane property.

Returns:
default JRootPane

void setJMenuBar ( final JMenuBar  menuBar  ) 

Sets the menu bar for the frame.

Parameters:
menuBar - menu bar to be placed in the frame

JMenuBar getJMenuBar (  ) 

Returns the menu bar for the frame.

Returns:
the menu bar for the frame

void setLayeredPane ( final JLayeredPane  layeredPane  ) 

Sets layeredPane property.

Parameters:
layeredPane - new layeredPane property value

Implements RootPaneContainer.

JLayeredPane getLayeredPane (  ) 

Returns layeredPane property.

Returns:
layeredPane property

Implements RootPaneContainer.

AccessibleContext getAccessibleContext (  ) 

Returns the accessible context for the frame.

Returns:
the accessible context for the frame

Implements Accessible.

String paramString (  )  [protected]

Returns string representation of this frame.

Returns:
string representation of this frame

Reimplemented from Frame.

void processWindowEvent ( final WindowEvent  e  )  [protected]

Implements actions depending on defaultCloseOperation property.

Parameters:
e - window event

void setLayout ( final LayoutManager  layout  ) 

void update ( final Graphics  g  ) 

Just calls paint(g).

This method was overridden to prevent an unnecessary call to clear the background.

Parameters:
g - the graphics context to paint

void setContentPane ( final Container  contentPane  ) 

Sets contentPane property.

Parameters:
contentPane - new contentPane property value

Implements RootPaneContainer.

Container getContentPane (  ) 

Returns the contentPane property.

Returns:
the contentPane property

Implements RootPaneContainer.

void setGlassPane ( final Component  glassPane  ) 

Set glassPane property.

Parameters:
glassPane - new glassPane property value

Implements RootPaneContainer.

void remove ( final Component  comp  ) 

Component getGlassPane (  ) 

Returns glassPane property.

Returns:
glassPane property

Implements RootPaneContainer.

void setRootPaneCheckingEnabled ( final boolean  enabled  )  [protected]

Sets rootPaneCheckingEnabled.

Parameters:
enabled - new rootPaneCheckingEnabled value

void setDefaultCloseOperation ( final int  operation  ) 

Sets defaultCloseOperation property.

This is a bound property.

Parameters:
operation - new defaultCloseOperation value

boolean isRootPaneCheckingEnabled (  )  [protected]

Returns rootPaneCheckingEnabled value.

Returns:
value of rootPaneCheckingEnabled

void frameInit (  )  [protected]

Called by the constructors to init JFrame.

int getDefaultCloseOperation (  ) 

Returns defaultCloseOperation value.

Returns:
defaultCloseOperation value

void setIconImage ( final Image  image  ) 

static void setDefaultLookAndFeelDecorated ( final boolean  defaultLookAndFeelDecorated  )  [static]

static boolean isDefaultLookAndFeelDecorated (  )  [static]

static Frame getSharedOwner (  )  [static, package]

Returns the frame that is used as a default shared owner for JDialog and JWindow.


Member Data Documentation

final long serialVersionUID = -1026528232454752719L [static, private]

Reimplemented from Frame.

final int EXIT_ON_CLOSE = 3 [static]

Implements WindowConstants.

boolean defaultLookAndFeelDecorated [static, private]

Frame sharedFrame [static, private]

JRootPane rootPane [protected]

boolean rootPaneCheckingEnabled [protected]

Reimplemented from Component.