尝试添加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()
中