首页 > 代码库 > JSP---调用javax.swing.JOptionPane类的对话框方法

JSP---调用javax.swing.JOptionPane类的对话框方法

Show an error dialog that displays the message, ‘alert‘:

JOptionPane.showMessageDialog(null, "alert", "alert", JOptionPane.ERROR_MESSAGE);

 

Show an internal information dialog with the message, ‘information‘:
JOptionPane.showInternalMessageDialog(frame, "information","information", JOptionPane.INFORMATION_MESSAGE);

 

Show an information panel with the options yes/no and message ‘choose one‘:
JOptionPane.showConfirmDialog(null,"choose one", "choose one", JOptionPane.YES_NO_OPTION);