0

尝试添加 LIstSelectionListener 并不断收到错误找不到符号 ListSelectionListener() ^ 符号类 ListSelectionListener

jlstExtras.addListSelectionListener(new ListSelectionListener() {
        public void valueChanged(ListSelectionEvent e) {
            int[] indices = jlstExtras.getSelectedIndices();

            int i;
            for( i = 0; i < indices.length; i++){
                if(indices[i] == 0)
                    delivery = 4.00;
                else if (indices[i] == 1)
                    tip = .15;
                else if (indices[i] == 2)
                    tip = .20;

            }       

        }
    });

错误在第一行部分(新 ListSelectionListener()

4

0 回答 0