JOptionPane 提供了如下 4 个方法来创建对话框 。...(jf, jta.getText(), "消息对话框", JOptionPane.ERROR_MESSAGE);
//JOptionPane.showMessageDialog(...(jf, jta.getText(), "消息对话框", JOptionPane.WARNING_MESSAGE);
//JOptionPane.showMessageDialog...(jf, jta.getText(), "消息对话框", JOptionPane.PLAIN_MESSAGE);
JOptionPane.showMessageDialog(jf...(jf, jta.getText(), "确认对话框",JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
if