Removing items from JList

前端 未结 6 1093
野性不改
野性不改 2021-01-01 05:26

I\'ve got a simple Jlist with data from List, Now I want to remove selected item from Jlist. Here is the code:

final DefaultListMo         


        
6条回答
  •  無奈伤痛
    2021-01-01 05:32

    DefaultListModel model=new DefaultListModel();
        model.clear();
     jList1.setModel(model);
    

    if you want delete all item

提交回复
热议问题