Chapter 1. Basics

Table of Contents

EventList, like ArrayList or Vector
JList, JComboBox and JTable: Widgets with models
A simple issue browser
So What?

In this tutorial we are going to build a program for browsing a list of issues. Our issues come from an XML file that is parsed using the included issuezilla.jar library. For your applications data may come from any source such as files or network services. We will demonstrate the features of Glazed Lists in this program and provide the source code to use these features.

In part one of this tutorial we discuss Glazed Lists and build a simple application that displays our list of issues within a JList.

EventList, like ArrayList or Vector

The EventList interface extends the familiarjava.util.List interface. This means it has the sameadd(), set() and remove() methods found in ArrayList and Vector.

But there are some differences between EventLists and the plain java.util.List:

  • Event listeners: In order to propagate changes from a source list to its various display widgets and transformations, EventLists fire events when modified.

  • Concurrency: EventLists may be accessed by multiple threads simultaneously so they provide easy-to-use and powerful locks.