看它的四个重载方法,是Icon参数你就传递一个Icon实例就行了,比如new ImageIcon("c:\\one.gif");

解决方案 »

  1.   

    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
      

  2.   

    请问Java或JBuilder自己有没有带感叹号的?怎么调用?谢谢!
      

  3.   

    sorry,没留意到最后一贴。我先试试看。
      

  4.   

    javax.swing.JOptionPane oMsgBox = new javax.swing.JOptionPane();
    oMsgBox.showMessageDialog(this,sMessage,sTitle,oMsgBox.INFORMATION_MESSAGE);
      

  5.   

    我还以为要加个图片Icon呢?
    四个重载函数试一试。
      

  6.   

    JOptionPane.showMessageDialog(null,"这样就可以显示感叹号了!");