String[] listItems = {
"Chris", "Joshua", "Daniel", "Michael",
"Don", "Kimi", "Kelly", "Keagan"
};
JFrame frame = new JFrame ("FilterHistoryJList");
frame.getContentPane().setLayout (new BorderLayout());
// populate list
FilterHistoryJList list = new FilterHistoryJList();
for (int i=0; i<listItems.length; i++)
list.addItem (listItems[i]);
// add to gui
JScrollPane pane =
new JScrollPane (list,
ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
frame.getContentPane().add (pane, BorderLayout.CENTER);
FilterField filterField = list.getFilterField();
frame.getContentPane().add (filterField, BorderLayout.NORTH);
frame.pack();
frame.setVisible(true);
filterField.textField.requestFocus();