JOptionPane.showConfirmDialog(null,"出错","提示",JOptionPane.ERROR_MESSAGE);

解决方案 »

  1.   

    1、showConfirmDialog(Component parentComponent, Object message)2、showConfirmDialog(Component parentComponent, Object message,       String title, int optionType)3、showConfirmDialog(Component parentComponent, Object message,       String title, int optionType, int messageType)4、showConfirmDialog(Component parentComponent, Object message,
     String title, int optionType,  int messageType, Icon icon)
      

  2.   

    JOptionPane.showConfirmDialog(null, "出错","提示",JOptionPane.ERROR_MESSAGE);
      

  3.   

    JOptionPane.showMessageDialog(null,"出错","提示",JOptionPane.ERROR_MESSAGE);
      

  4.   

    JOptionPane.showConfirmDialog(null,"出错","提示",JOptionPane.ERROR_MESSAGE);
    能否告之上句中的null具体表示,谢了!
      

  5.   

    JOptionPane.showConfirmDialog(null,"出错","提示",JOptionPane.ERROR_MESSAGE);
    一般JPptionPane方法,第一个参数总是为:NULL
      

  6.   

    把win这个class改成下面的样子
    class win implements ActionListener
    {
      JFrame fra;
      JPanel pan;
      JLabel lab;
      JButton but;

      public win()
      {
        fra = new JFrame();
        pan = new JPanel();
        lab = new JLabel("Óû§Ãû:");
        but = new JButton("ok");

        but.addActionListener(this);
        pan.add(lab);
        pan.add(but);
        fra.getContentPane().add(pan);

        fra.setSize(200, 200);
        fra.show();
      }

      public void actionPerformed(ActionEvent evt)
      {
        JOptionPane  op = new JOptionPane();

        op.showConfirmDialog(fra, "³ö´í", "Ìáʾ", JOptionPane.ERROR_MESSAGE);
      }
    }