Java JList Add Remove removeAllListItems(JList sourceList)

Here you can find the source of removeAllListItems(JList sourceList)

Description

remove All List Items

License

Open Source License

Declaration

public static void removeAllListItems(JList sourceList) 

Method Source Code

//package com.java2s;
import javax.swing.DefaultListModel;
import javax.swing.JList;

public class Main {
    public static void removeAllListItems(JList sourceList) {
        DefaultListModel selectedTableListModel = (DefaultListModel) sourceList
                .getModel();//from  w ww .j a v a2s .  c o  m
        selectedTableListModel.removeAllElements();
    }
}

Related

  1. addToList(JList list, Object object)
  2. fillList(Collection anList, JList anJList)
  3. fillList(JList aListComponent, String theList, boolean removeQuotes)
  4. fillList(Object[] elements, JList list)
  5. JListAddObject(javax.swing.JList list, Object item)
  6. removeFromList(JList list, Object object)
  7. removeItemJList(javax.swing.JList jlist)