remove.addActionListener(
    new ActionListener(){
    public void actionPerformed(ActionEvent e){
    Object obj = list.getSelectedValue();
    listModel.removeElement(obj);
//     listModel.trimToSize();
    list = new JList(listModel);
    }
    });
remove 是JButton
不知道为什么启动程序后只能删除list的一个元素,然后就删不了第二个了,求解