protected void buildChooser() { setLayout(new BorderLayout()); myDescriptorList = new JBList(myColorDescriptors); myDescriptorList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); myDescriptorList.setVisibleRowCount(15); myDescriptorList.setCellRenderer(new ColorRenderer()); myDescriptorList.addListSelectionListener(new ListSelectionListener() { public void valueChanged(ListSelectionEvent e) { ColorDescriptor descriptor = (ColorDescriptor)myDescriptorList.getSelectedValue(); getColorSelectionModel().setSelectedColor(new ColorDescriptorWrapper(descriptor)); } }); new ListSpeedSearch(myDescriptorList); add(ScrollPaneFactory.createScrollPane(myDescriptorList), BorderLayout.CENTER); }