Class ListUpdatingTest

java.lang.Object
  extended byListUpdatingTest

public class ListUpdatingTest
extends java.lang.Object

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

ListUpdatingTest

public ListUpdatingTest()
Method Detail

main

public static void main(java.lang.String[] args)
                 throws java.lang.ClassNotFoundException
Create the scrolling lists and display in a JFrame; see code body comments for details.

Throws:
java.lang.ClassNotFoundException