如题,每次调用这个函数都会提示警告,急切地想知道为什么,希望有高人能从根本上解释一下,感激不尽!

解决方案 »

  1.   

    class MainFrame extends JFrame implements ActionListener {
        JPanel buttons = new JPanel() ;
        JPanel canvas = new JPanel() ;
        JButton btnAdd = new JButton("") ;
        JButton btnSetFinished = new JButton("") ;
        JButton btnSetUnfinished = new JButton("") ;
        JButton btnDelete = new JButton("") ;    public MainFrame (String title) {
    super (title) ;
    this.getContentPane().add(canvas) ;
    this.getContentPane().add(buttons) ;
    this.setLayout(new FlowLayout()); buttons.add(btnAdd) ;
    buttons.add(btnSetFinished) ;
    buttons.add(btnSetUnfinished) ;
    buttons.add(btnDelete) ;
    buttons.setLayout(new GridLayout(4 , 1)) ; pack() ;
    this.setVisible(true) ; this.addWindowListener(new WindowAdapter() {
        @Override
        public void windowClosing(WindowEvent we) {
    System.exit(0);
        }
    }) ;
    btnAdd.addActionListener(this) ;
    btnSetFinished.addActionListener(this) ;
    btnSetUnfinished.addActionListener(this) ;
    btnDelete.addActionListener(this) ;
        }    @Override
        public void actionPerformed(ActionEvent ae) {
    throw new UnsupportedOperationException("Not supported yet.");
        }}
      

  2.   

    http://hi.csdn.net/space-8210764-do-album-picid-792773-goto-down.html
      

  3.   

    elipse表示运行正常!
    把那句抛异常的话去掉 加上你想要申明的事件就行了。
      

  4.   

    运行确实没有问题,这只是一个"构造函数中传递可疑参数"的提示,是NetBeans7.0给的提示,也确实可以通过配置将这个设置为不提示直接忽略,但是我想知道这是怎么回事,这是否跟访问限制规则有关,直接忽略是否会留下不安全的隐患?
      

  5.   

    可以這個中文語言包是機器翻譯的,太差勁了。英文錯誤估計有人看懂,這中文不知道說的是啥,就好像“認證”這個詞,在計算機英語中有 Certification 和 Authentication 兩個詞翻譯成中文都叫“認證”,在沒有上下文的情況下,猜不出到底是哪個。要是有人工翻譯的話那就更容易懂了。