javax.swing
public interface ListModel
JList
Modifier and Type | Method and Description |
---|---|
void |
addListDataListener(ListDataListener l)
Adds a listener to the list that's notified each time a change
to the data model occurs.
|
Object |
getElementAt(int index)
Returns the value at the specified index.
|
int |
getSize()
Returns the length of the list.
|
void |
removeListDataListener(ListDataListener l)
Removes a listener from the list that's notified each time a
change to the data model occurs.
|
int getSize()
Object getElementAt(int index)
index
- the requested indexindex
void addListDataListener(ListDataListener l)
l
- the ListDataListener
to be addedvoid removeListDataListener(ListDataListener l)
l
- the ListDataListener
to be removed Submit a bug or feature Copyright © 1993, 2017, Oracle and/or its affiliates. All rights reserved.
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.