JOptionPane : Java Glossary


Used in Swing for simple pop-up modal dialog boxes to interact with the user, sort of a streamlined JDialog to handle common cases.

Dialog is the AWT (Advanced Windowing Toolkit) equivalent of JoptionPane. Here are some

// sample use of JOptionPane.showMessageDialog
import javax.swing.JOptionPane;

JOptionPane.showMessageDialog( this,
                               "That name is already taken.",
                               "Duplicate Name",
                               JOptionPane.ERROR_MESSAGE );
Finally, there is showOptionDialog: the Grand Unification of the above three, which I have not shown.

Learning More

Oracle’s Javadoc on JOptionPane class : available:

This page is posted
on the web at:

Optional Replicator mirror
on local hard disk J:

Please the feedback from other visitors, or your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.

Your face IP:[]
You are visitor number