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:

QUESTION_MESSAGE

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

 

 

 

Program Source

import javax.swing.JOptionPane;

public class Javaapplication{

      public static void main(String[] args) {

            JOptionPane.showMessageDialog(null,"Message","Title",JOptionPane.QUESTION_MESSAGE);
    }
}

Leave a Comment