JOptionPane.showMessageDialog(null,"This is Message area.","This is title",JOptionPane.INFORMATION_MESSAGE);
showMessageDialog(警告级别,仅显示提示文本和确定按钮)
JOptionPane.showMessageDialog(null,"This is Message area.","This is tile",JOptionPane.WARNING_MESSAGE);
showMessageDialog(错误级别,仅显示提示文本和确定按钮)
JOptionPane.showMessageDialog(null,"This is Message area.","This is tile",JOptionPane.ERROR_MESSAGE);
showInputDialog(显示下拉可选项并将其返回)
Object[] options ={"A","B","C","D"};
String s =(String) JOptionPane.showInputDialog(null,"Choose an item to return","This is title",
JOptionPane.PLAIN_MESSAGE, null, options, options[0]);
showInputDialog(显示文本输入框并将输入内容返回)
String returnContent = JOptionPane.showInputDialog(null,"Enter:","This is title", JOptionPane.PLAIN_MESSAGE);