JLabel
In addition to having a line of text and an alignment, Jlabels may have an icon, which is an image placed beside or above the text: JLabel label = new JLabel ( “Text”, icon, SwingConstants.CENTER );
The icon argument is anything that implements the interface Icon, such as ImageIcon.
Note that the label alignment constants come from an interface called SwingConstants, which include LEFT, RIGHT, CENTER, NORTH, EAST, and so on.
Where the icon is placed with respect to the text can be specified and fine-tuned with various horizontal and vertical alignment methods.