Show a message dialog with JOptionPane

This code example shows how to easily display a message dialog using the Swing class JOptionPane.

If you want an icon on the dialog, provide an instance of the
Icon class as a fifth parameter to showMessageDialog().

Search for more Java info on this site here:
Custom Search

Any thoughts or questions?