+ 1
JOptionPane
JOptionPane.showMessageDialog(null,"the sum is "+sum,"Answer",JOptionPane.PLAIN_MESSAGE); // what is the meaning of "JOptionPane.PLAIN_MESSAGE"? is it a kind of object?
2 Respuestas
+ 1
Good question. PLAIN_MESSAGE is a static variable of JOptionPane class. Static variables are variables belonging to a class rather than an object. They can be called directly on the class.
In this case PLAIN_MESSAGE holds an integer value which indicates to the showMessageDialog that the dialog is a plain message.
0
it is the constant with meaning: "No icon is used".
public static final int PLAIN_MESSAGE