Module java.desktop
Package javax.swing

Interface ListModel<E>

    • Method Detail

      • getSize

        int getSize​()
        Returns the length of the list.
        Returns:
        the length of the list
      • getElementAt

        E getElementAt​(int index)
        Returns the value at the specified index.
        Parameters:
        index - the requested index
        Returns:
        the value at index
      • addListDataListener

        void addListDataListener​(ListDataListener l)
        Adds a listener to the list that's notified each time a change to the data model occurs.
        Parameters:
        l - the ListDataListener to be added
      • removeListDataListener

        void removeListDataListener​(ListDataListener l)
        Removes a listener from the list that's notified each time a change to the data model occurs.
        Parameters:
        l - the ListDataListener to be removed