
Constructors
JLabel( String text )
creates a JLabel object that displays the specified text.
JLabel( String text, int alignment )
creates a JLabel object that displays the specified text.The align-
ment argument specifies the alignment of the text within the
label component.The alignment value can be any of the following
static int constants of the SwingConstants interface:LEFT,CENTER,
RIGHT,LEADING,or TRAILING.By default,the label text is left-
adjusted.
JLabel( Icon image )
creates a JLabel object that displays the image.
Useful Methods of the JLabel Class
Return value Method name and argument list
void setIcon( Icon newIcon )
sets the Icon to be displa ...