JOptionPane showMessageDialog(PLAIN_MESSAGE)

showMessageDialog( Component parent, Object message, String title, PLAIN_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. This can be a String object specifying the message.Third argument specifies by the title. The fourth argument, messageType, can be:

PLAIN_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 no symbol for PLAIN_MESSAGE.

Program

 

 

 

Program Source

public class Javaapplication{

      public static void main(String[] args) {

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

Leave a Comment