"showMessageDialog" method in swing package
Code :
import javax.swing.JOptionPane;
class my11{
public static void main(String arg[]){
JOptionPane.showMessageDialog(null,"Hello \n how are you? ");
}
}
Please be kind to reply, what are the other values that we can pass to call the above method except "null"
Re: "showMessageDialog" method in swing package
As taken from the Javadoc.
JOptionPane.showMessageDialog(parentComponent, message, title, messageType, icon)
Quote:
Parameters:
parentComponent determines the Frame in which the dialog is displayed; if null, or if the parentComponent has no Frame, a default Frame is used
message the Object to display
title the title string for the dialog
messageType the type of message to be displayed: ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE, or PLAIN_MESSAGE
icon an icon to display in the dialog that helps the user identify the kind of message that is being displayed
// Json