This code example shows how to easily display a message dialog using the Swing class JOptionPane.
The ‘Look and Feel’ is the term for the appearance of the graphical user interface of an application and it should be set prior to constructing and rendering any of the GUI. This example shows a couple of variants on how to set the look and feel for a Swing application.
The Java Development Kit contains a few look and feel classes (i.e. subclasses of the LookAndFeel class):
To make a JLabel contain more than one row of text, use HTML to add the text with a new line (br-tag) between the text items.