public static void showMessageDialog(Component parentComponent, Object message, String title, int messageType, Icon icon) Parameters:parentComponent - determines the Frame in which the dialog is displayed; if null, or if the parentComponent has no Frame, a default Frame is usedmessage - the Object to displaytitle - the title string for the dialogmessageType - the type of message to be displayed: ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE, or PLAIN_MESSAGEicon - an icon to display in the dialog that helps the user identify the kind of message that is being displayed
请问Java或JBuilder自己有没有带感叹号的?怎么调用?谢谢!
sorry,没留意到最后一贴。我先试试看。
javax.swing.JOptionPane oMsgBox = new javax.swing.JOptionPane(); oMsgBox.showMessageDialog(this,sMessage,sTitle,oMsgBox.INFORMATION_MESSAGE);
Object message,
String title,
int messageType,
Icon icon) Parameters:parentComponent - determines the Frame in which the dialog is displayed; if null, or if the parentComponent has no Frame, a default Frame is usedmessage - the Object to displaytitle - the title string for the dialogmessageType - the type of message to be displayed: ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE, or PLAIN_MESSAGEicon - an icon to display in the dialog that helps the user identify the kind of message that is being displayed
oMsgBox.showMessageDialog(this,sMessage,sTitle,oMsgBox.INFORMATION_MESSAGE);
四个重载函数试一试。