
JFrame
Package: javax.swing
Description: a window user interface component
Constructors
JFrame( )
constructs a JFrame object,initially invisible,with no text in the
title bar.
JFrame( String titleBarText )
constructs a JFrame object,initially invisible,with titleBarText dis-
played on the window’s title bar.
Useful Methods of the JFrame Class
Return value Method name and argument list
Container getContentPane( )
returns the content pane object for this window.
void setDefaultCloseOperation( int operation )
sets the default operation when the user closes this window,that
is,when the user clicks on the X icon in the top-right corner of the
window.
void setSize( ...