Fields of JOptionPane
Fields |
Description |
---|---|
int ERROR_MESSAGE |
A Constant code displaying an error message icon. |
int INFORMATION_MESSAGE |
A Constant code displaying information message icon. |
int WARNING_MESSAGE |
A Constant code for displaying Warning message icon. |
int YES_NO_OPTION |
A constant for creating a dialog with “Yes” and “No” options. |
int YES_NO_CANCEL_OPTION |
A constant for creating a dialog with “Yes,” “No,” and “Cancel” options. |
int OK_CANCEL_OPTION |
A constant for creating a dialog with “OK” and “Cancel” options. |
Java JOptionPane
In Java, JOptionPane is a part of the Java Swing library. It helps us to create dialog boxes such as message dialogs, conformation dialogs, input dialogs, and options dialogs In this article, we are going to explore some constructors, methods, and some examples of JOptionPane.