可以用这个阿
public static void showMessageDialog(Component parent,Object message,String title,int messagetype,Icon icon)
是这个意思么?

解决方案 »

  1.   

    你执行下面applit.java就知道我的意思了
    import javax.swing.JOptionPane;
    public class applit {
      public static void main(String args[]) {
        String alpha = "asdflkaodsdjfa";
        JOptionPane.showMessageDialog(null, alpha);
        System.exit(0);
      }
    }
      

  2.   

    注意我最开头的那句:
    我不希望消息框上面的java图标和那个蓝体圆框i显示出来
      

  3.   

    怎么做阿?
    我只要取消它们就行,并不需要其它的,该如何做?
    如果需要自己编写新CLASS,请给点代码
      

  4.   

    去掉蓝体圆框i:
        JOptionPane.showMessageDialog( null, "This is a test", "Title",
          JOptionPane.PLAIN_MESSAGE );
      

  5.   

    都去掉:
        JOptionPane pane = new JOptionPane( "This is a test",
          JOptionPane.PLAIN_MESSAGE );
        JDialog dialog = pane.createDialog( null, "Title" );
        dialog.setResizable( false );
        dialog.show();
      

  6.   

    用JLabel做message可以改字体:
        Font f = new Font( "Serif", Font.ITALIC, 36 );
        JLabel label = new JLabel( "This is a test." );
        label.setFont( f );
        JOptionPane pane = new JOptionPane( label,
          JOptionPane.PLAIN_MESSAGE );
        JDialog dialog = pane.createDialog( null, "Title" );
        dialog.setResizable( false );
        dialog.show();