Class ListTest

java.lang.Object
  extended byListTest

public class ListTest
extends java.lang.Object

Class ListTest is a simple test of the swing JList widget. The test displays three JLists in a scrolling horizontal box. The leftmost list is clickable using the mouse, the other two lists are not clickable.

Each JList is constructed with an array as the model data. Of note is how JList uses the toString method generically to display the elements of the model array; e.g., see Pair.toString().


Nested Class Summary
static class ListTest.Pair
          Class Pair is a simple pair of integers with a specialization of toString to support displying a Pair in a JList.
 
Constructor Summary
ListTest()
           
 
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

ListTest

public ListTest()
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