|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectListUpdatingTest
Class ListUpdatingTest is a modification of the ListTest class in this directory. The modification adds a button that increases the size of the leftmost JList model and tells the JList display to update itself. To have the JList updating be automatic, the data model is declared as DefaultListModel instead of an array. DefaultListModel implements the necessary interface to update the JList when its model data change.
Nested Class Summary | |
static class |
ListUpdatingTest.ColorRenderer
Class ColorRenderer draws the list element text in color. |
static class |
ListUpdatingTest.Pair
Class Pair is a simple pair of integers with a specialization of toString to support displying a Pair in a JList. |
Constructor Summary | |
ListUpdatingTest()
|
Method Summary | |
static void |
main(java.lang.String[] args)
Create the scrolling lists and display in a JFrame; see code body comments for details. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ListUpdatingTest()
Method Detail |
public static void main(java.lang.String[] args) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |