JOptionPane showMessageDialog(QUESTION_MESSAGE)

showMessageDialog( Component parent, Object message, String title, QUESTION_MESSAGE)

The first argument is the parent for the dialog that is used to position the dialog. The second argument specifies what is to be displayed in addition to the default OK button. Third argument specifies by the title. The fourth argument, messageType, can be:


These static JOptionPane fields determine the style of the message constrained by the current look-and-feel. This usually includes a default icon, such as a warningsymbol for QUESTION_MESSAGE.





Program Source

import javax.swing.JOptionPane;

public class Javaapplication{

      public static void main(String[] args) {


Leave a Comment